mirror of
https://github.com/kata-containers/kata-containers.git
synced 2025-08-30 23:02:37 +00:00
Merge pull request #11597 from kata-containers/topic/fix-release-static-tarball-content
release: Copy the VERSION file to the tarball
This commit is contained in:
commit
d60513ece9
@ -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:
|
||||
|
@ -4,12 +4,15 @@
|
||||
# SPDX-License-Identifier: Apache-2.0
|
||||
#
|
||||
|
||||
[ -z "${DEBUG}" ] || set -x
|
||||
[[ -z "${DEBUG}" ]] || set -x
|
||||
set -o errexit
|
||||
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:-""}
|
||||
|
||||
@ -23,17 +26,23 @@ mkdir "${tarball_content_dir}"
|
||||
|
||||
for c in kata-static-*.tar.xz
|
||||
do
|
||||
echo "untarring tarball "${c}" into ${tarball_content_dir}"
|
||||
echo "untarring tarball \"${c}\" into ${tarball_content_dir}"
|
||||
tar -xvf "${c}" -C "${tarball_content_dir}"
|
||||
done
|
||||
|
||||
pushd ${tarball_content_dir}
|
||||
pushd "${tarball_content_dir}"
|
||||
shim="containerd-shim-kata-v2"
|
||||
shim_path=$(find . -name ${shim} | sort | head -1)
|
||||
shim_path=$(find . -name "${shim}" | sort | head -1)
|
||||
prefix=${shim_path%"bin/${shim}"}
|
||||
|
||||
echo "$(git describe --tags)" > ${prefix}/VERSION
|
||||
[[ -n "${kata_versions_yaml_file}" ]] && cp ${kata_versions_yaml_file_path} ${prefix}/
|
||||
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
|
||||
git describe --tags > "${prefix}/VERSION"
|
||||
fi
|
||||
[[ -n "${kata_versions_yaml_file}" ]] && cp "${kata_versions_yaml_file_path}" "${prefix}/"
|
||||
popd
|
||||
|
||||
echo "create ${tar_path}"
|
||||
|
Loading…
Reference in New Issue
Block a user