diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml index d76079329b..fd095472c0 100644 --- a/.github/workflows/release.yml +++ b/.github/workflows/release.yml @@ -190,10 +190,11 @@ jobs: - name: set package version shell: bash run: | - current_date=$(date +%Y.%m) + release_year=$(grep 'release-year:' release-cycle-info | awk '{print $2}') + release_month=$(grep 'release-month:' release-cycle-info | awk '{print $2}') release_cycle=$(grep 'release-cycle:' release-cycle-info | awk '{print $2}') release_cycle_counter=$(grep 'release-cycle-counter:' release-cycle-info | awk '{print $2}') - version="$current_date.$release_cycle.$release_cycle_counter" + version="$release_year.$release_month.$release_cycle.$release_cycle_counter" echo "PACKAGE_VERSION=$version" >> $GITHUB_ENV - name: package release artifacts diff --git a/Justfile b/Justfile index d52041e73f..8e260b9804 100644 --- a/Justfile +++ b/Justfile @@ -374,10 +374,11 @@ package-arch arch: if [[ -n $PACKAGE_VERSION ]]; then version="$PACKAGE_VERSION" else - current_date=$(date +%Y.%m) + release_year=$(grep 'release-year:' release-cycle-info | awk '{print $2}') + release_month=$(grep 'release-month:' release-cycle-info | awk '{print $2}') release_cycle=$(grep 'release-cycle:' release-cycle-info | awk '{print $2}') release_cycle_counter=$(grep 'release-cycle-counter:' release-cycle-info | awk '{print $2}') - version="$current_date.$release_cycle.$release_cycle_counter" + version="$release_year.$release_month.$release_cycle.$release_cycle_counter" fi architecture="{{arch}}" zip_filename="${version}.autonomi.${architecture}.zip" diff --git a/release-cycle-info b/release-cycle-info index 2824e15b91..38bd3823ed 100644 --- a/release-cycle-info +++ b/release-cycle-info @@ -1,3 +1,9 @@ +# The reason for having the year and month here rather than reading it from the OS is because we +# have two cycles per month, but the RC can be built for the first cycle of the following month, in +# the current month. So for example, you could build the first September RC before the month of +# August ends, hence reading the current date from the OS would give you 08 rather than 09. The same +# thing applies to the year. So, it's simple enough to just define them here. +# # The release-cycle is the cycle within the current month. It will be 1 or 2. It is set at the # beginning of the cycle. # @@ -6,5 +12,7 @@ # # Both of these numbers are used in the packaged version number, which is a collective version # number for all the released binaries. +release-year: 2024 +release-month: 08 release-cycle: 2 release-cycle-counter: 4