feat(release): let the image set the Coolify version

- The upgrade script removes COOLIFY_VERSION from .env, so a tag such as nightly or pr-1234 is never taken for the version
- install.sh still takes a version such as 4.6.0-beta.1, LATEST_IMAGE in .env picks the image and the image carries its version
This commit is contained in:
peaklabs-dev
2026-11-01 19:37:39 +01:00
parent e0fb2b3897
commit 161f4459a6
2 changed files with 3 additions and 3 deletions
+1 -1
View File
@@ -318,7 +318,7 @@ log "All images pulled successfully"
echo " All images pulled successfully."
set_env_var "LATEST_IMAGE" "$LATEST_IMAGE"
set_env_var "COOLIFY_VERSION" "$LATEST_IMAGE"
sed -i '/^COOLIFY_VERSION=/d' "$ENV_FILE"
log_section "Step 4/6: Stopping and restarting containers"
write_status "4" "Stopping containers"
+2 -2
View File
@@ -57,7 +57,7 @@ it('persists the selected registry url during upgrades', function (string $path)
'stable upgrade' => 'scripts/upgrade.sh',
]);
it('persists the target image and runtime version before recreating containers', function (string $path) {
it('persists the target image and lets the image set its version before recreating containers', function (string $path) {
$script = file_get_contents(getcwd().'/'.$path);
if ($script === false) {
throw new RuntimeException("Unable to read {$path}");
@@ -73,7 +73,7 @@ it('persists the target image and runtime version before recreating containers',
};
$latestImagePosition = $position('set_env_var "LATEST_IMAGE" "$LATEST_IMAGE"');
$coolifyVersionPosition = $position('set_env_var "COOLIFY_VERSION" "$LATEST_IMAGE"');
$coolifyVersionPosition = $position('sed -i \'/^COOLIFY_VERSION=/d\' "$ENV_FILE"');
$imagesPulledPosition = $position('log "All images pulled successfully"');
$composeUpPosition = $position('docker compose --env-file /data/coolify/source/.env');