From: Michał Kępień Date: Wed, 22 Oct 2025 07:45:29 +0000 (+0200) Subject: Revise release directory naming X-Git-Tag: v9.21.15~33^2~6 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=8d548cbb58492a929a5c520b03ae1eefce204dbb;p=thirdparty%2Fbind9.git Revise release directory naming Include the Git tag in the name of the release directory rather than just the version number. Revise the script for the "release" job accordingly. This enables using the $CI_COMMIT_TAG variable in job scripts without the need to resort to string manipulation to strip the leading "v", improving readability. The only place where string manipulation is applied to the Git tag is now the "release" job itself, to verify that the Git tag matches the version number embedded in the source tarball name. --- diff --git a/.gitlab-ci.yml b/.gitlab-ci.yml index c153c63ae35..8ee438ad33f 100644 --- a/.gitlab-ci.yml +++ b/.gitlab-ci.yml @@ -1615,18 +1615,17 @@ release: <<: *base_image stage: release script: - - export BIND_DIRECTORY="$(basename build/meson-dist/bind-*.tar.xz ".tar.xz")" + - export RELEASE_DIRECTORY="bind-${CI_COMMIT_TAG}-release" + - export BIND_VERSION="bind-${CI_COMMIT_TAG#v}" # Prepare release tarball contents (tarballs + documentation) - - mkdir -p "${BIND_DIRECTORY}-release/doc/arm" - - pushd "${BIND_DIRECTORY}-release" - - mv "../build/meson-dist/${BIND_DIRECTORY}.tar.xz" . - - tar --extract --file="${BIND_DIRECTORY}.tar.xz" - - mv "${BIND_DIRECTORY}"/{COPYRIGHT,LICENSE,README.md,srcid} . - - rm -rf "${BIND_DIRECTORY}" + - mkdir -p "${RELEASE_DIRECTORY}/doc/arm" + - pushd "${RELEASE_DIRECTORY}" + - mv "../build/meson-dist/${BIND_VERSION}.tar.xz" . + - tar --extract --file="${BIND_VERSION}.tar.xz" --strip-components=1 "${BIND_VERSION}"/{COPYRIGHT,LICENSE,README.md,srcid} - mv ../build/arm/ doc/arm/html/ - mv ../build/arm-epub/Bv9ARM.epub doc/arm/ - - echo 'Redirect' > "RELEASE-NOTES-${BIND_DIRECTORY}.html" - - echo 'Redirect' > "CHANGELOG-${BIND_DIRECTORY}.html" + - echo 'Redirect' > "RELEASE-NOTES-${BIND_VERSION}.html" + - echo 'Redirect' > "CHANGELOG-${BIND_VERSION}.html" - popd needs: - job: tarball-create @@ -1637,7 +1636,7 @@ release: - *rule_tag artifacts: paths: - - "*-release" + - bind-${CI_COMMIT_TAG}-release expire_in: "1 month" # Job signing the source tarballs in the release directory @@ -1647,7 +1646,7 @@ sign: tags: - signer script: - - export RELEASE_DIRECTORY="$(echo *-release)" + - export RELEASE_DIRECTORY="bind-${CI_COMMIT_TAG}-release" - pushd "${RELEASE_DIRECTORY}" - | echo