mirror of
https://github.com/kata-containers/kata-containers.git
synced 2025-08-17 23:47:07 +00:00
release: Copy the VERSION file to the tarball
For the release itself, let's simply copy the VERSION file to the tarball. To do so, we had to change the logic that merges the build, as at that point the tag is not yet pushed to the repo. Signed-off-by: Fabiano Fidêncio <fidencio@northflank.com>
This commit is contained in:
parent
21ccaf4a80
commit
aaeb3b3221
@ -343,6 +343,8 @@ jobs:
|
||||
- name: merge-artifacts
|
||||
run: |
|
||||
./tools/packaging/kata-deploy/local-build/kata-deploy-merge-builds.sh kata-artifacts versions.yaml
|
||||
env:
|
||||
RELEASE: ${{ inputs.stage == 'release' && 'yes' || 'no' }}
|
||||
- name: store-artifacts
|
||||
uses: actions/upload-artifact@ea165f8d65b6e75b540449e92b4886f43607fa02 # v4.6.2
|
||||
with:
|
||||
|
@ -313,6 +313,8 @@ jobs:
|
||||
- name: merge-artifacts
|
||||
run: |
|
||||
./tools/packaging/kata-deploy/local-build/kata-deploy-merge-builds.sh kata-artifacts versions.yaml
|
||||
env:
|
||||
RELEASE: ${{ inputs.stage == 'release' && 'yes' || 'no' }}
|
||||
- name: store-artifacts
|
||||
uses: actions/upload-artifact@ea165f8d65b6e75b540449e92b4886f43607fa02 # v4.6.2
|
||||
with:
|
||||
|
@ -256,6 +256,8 @@ jobs:
|
||||
- name: merge-artifacts
|
||||
run: |
|
||||
./tools/packaging/kata-deploy/local-build/kata-deploy-merge-builds.sh kata-artifacts versions.yaml
|
||||
env:
|
||||
RELEASE: ${{ inputs.stage == 'release' && 'yes' || 'no' }}
|
||||
- name: store-artifacts
|
||||
uses: actions/upload-artifact@ea165f8d65b6e75b540449e92b4886f43607fa02 # v4.6.2
|
||||
with:
|
||||
|
@ -342,6 +342,8 @@ jobs:
|
||||
- name: merge-artifacts
|
||||
run: |
|
||||
./tools/packaging/kata-deploy/local-build/kata-deploy-merge-builds.sh kata-artifacts versions.yaml
|
||||
env:
|
||||
RELEASE: ${{ inputs.stage == 'release' && 'yes' || 'no' }}
|
||||
- name: store-artifacts
|
||||
uses: actions/upload-artifact@ea165f8d65b6e75b540449e92b4886f43607fa02 # v4.6.2
|
||||
with:
|
||||
|
@ -10,6 +10,9 @@ set -o nounset
|
||||
set -o pipefail
|
||||
set -o errtrace
|
||||
|
||||
this_script_dir="$(cd "$(dirname "${BASH_SOURCE[0]}")" && pwd)"
|
||||
repo_root_dir="$(cd "${this_script_dir}/../../../../" && pwd)"
|
||||
|
||||
kata_build_dir=${1:-build}
|
||||
kata_versions_yaml_file=${2:-""}
|
||||
|
||||
@ -32,7 +35,13 @@ pushd ${tarball_content_dir}
|
||||
shim_path=$(find . -name ${shim} | sort | head -1)
|
||||
prefix=${shim_path%"bin/${shim}"}
|
||||
|
||||
echo "$(git describe --tags)" > ${prefix}/VERSION
|
||||
if [[ "${RELEASE:-no}" == "yes" ]] && [[ -f "${repo_root_dir}/VERSION" ]]; then
|
||||
# In this case the tag was not published yet,
|
||||
# thus we need to rely on the VERSION file.
|
||||
cp "${repo_root_dir}/VERSION" "${prefix}/"
|
||||
else
|
||||
echo "$(git describe --tags)" > "${prefix}/VERSION"
|
||||
fi
|
||||
[[ -n "${kata_versions_yaml_file}" ]] && cp ${kata_versions_yaml_file_path} ${prefix}/
|
||||
popd
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user