diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml index 5c0ed19c5..011b3fef1 100644 --- a/.github/workflows/release.yml +++ b/.github/workflows/release.yml @@ -269,6 +269,19 @@ jobs: # for the wheels-cli ForgeBox artifact. See #2326. find cli/lucli -type f \( -name "*.json" -o -name "*.md" -o -name "*.cfm" -o -name "*.cfc" \) -exec sed -i.bak "s/@build\.version@/${MODULE_VERSION}/g" {} \; find cli/lucli -name "*.bak" -delete + # Generate .module-version at build time with the canonical version. + # This file is read at runtime by the brew/scoop/.deb/.rpm wrappers + # for two purposes: + # (1) `wheels --version` displays its contents verbatim + # (2) The wrappers compare staged-module-version vs installed-version + # to decide whether to re-sync the module on first run + # The substitution above only matches *.json *.md *.cfm *.cfc, so + # `.module-version` (no extension) was previously sourced from a stale + # source-tracked file and embedded into every artifact (snapshot AND + # GA). That made every release look like the same snapshot tag and + # broke channel-switch sync detection. Generating it here ensures + # both behaviors stay correct. See #2758 follow-up. + echo "${MODULE_VERSION}" > cli/lucli/.module-version tar czf "artifacts/wheels/${MODULE_VERSION}/wheels-module-${MODULE_VERSION}.tar.gz" -C cli/lucli . cd cli/lucli && zip -r "../../artifacts/wheels/${MODULE_VERSION}/wheels-module-${MODULE_VERSION}.zip" . && cd ../.. cd artifacts/wheels/${{ env.WHEELS_VERSION }} diff --git a/.gitignore b/.gitignore index 1c5f1e954..f1c756538 100644 --- a/.gitignore +++ b/.gitignore @@ -19,6 +19,11 @@ META-INF !/vendor/wheels/ /cli/workspace/ /cli/simpletestapp/ +# Generated at release time by .github/workflows/release.yml — see #2758 +# follow-up. Source-tracked stale values cause `wheels --version` to show +# a snapshot tag on GA installs and break channel-switch detection in the +# brew/scoop wrappers (which compare staged vs installed `.module-version`). +/cli/lucli/.module-version # Database files /db/ diff --git a/cli/lucli/.module-version b/cli/lucli/.module-version deleted file mode 100644 index 127a4d907..000000000 --- a/cli/lucli/.module-version +++ /dev/null @@ -1 +0,0 @@ -4.0.0-SNAPSHOT+1442 \ No newline at end of file