mirror of
https://github.com/kata-containers/kata-containers.git
synced 2025-09-01 17:06:28 +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:
@@ -343,6 +343,8 @@ jobs:
|
|||||||
- name: merge-artifacts
|
- name: merge-artifacts
|
||||||
run: |
|
run: |
|
||||||
./tools/packaging/kata-deploy/local-build/kata-deploy-merge-builds.sh kata-artifacts versions.yaml
|
./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
|
- name: store-artifacts
|
||||||
uses: actions/upload-artifact@ea165f8d65b6e75b540449e92b4886f43607fa02 # v4.6.2
|
uses: actions/upload-artifact@ea165f8d65b6e75b540449e92b4886f43607fa02 # v4.6.2
|
||||||
with:
|
with:
|
||||||
|
@@ -313,6 +313,8 @@ jobs:
|
|||||||
- name: merge-artifacts
|
- name: merge-artifacts
|
||||||
run: |
|
run: |
|
||||||
./tools/packaging/kata-deploy/local-build/kata-deploy-merge-builds.sh kata-artifacts versions.yaml
|
./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
|
- name: store-artifacts
|
||||||
uses: actions/upload-artifact@ea165f8d65b6e75b540449e92b4886f43607fa02 # v4.6.2
|
uses: actions/upload-artifact@ea165f8d65b6e75b540449e92b4886f43607fa02 # v4.6.2
|
||||||
with:
|
with:
|
||||||
|
@@ -256,6 +256,8 @@ jobs:
|
|||||||
- name: merge-artifacts
|
- name: merge-artifacts
|
||||||
run: |
|
run: |
|
||||||
./tools/packaging/kata-deploy/local-build/kata-deploy-merge-builds.sh kata-artifacts versions.yaml
|
./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
|
- name: store-artifacts
|
||||||
uses: actions/upload-artifact@ea165f8d65b6e75b540449e92b4886f43607fa02 # v4.6.2
|
uses: actions/upload-artifact@ea165f8d65b6e75b540449e92b4886f43607fa02 # v4.6.2
|
||||||
with:
|
with:
|
||||||
|
@@ -342,6 +342,8 @@ jobs:
|
|||||||
- name: merge-artifacts
|
- name: merge-artifacts
|
||||||
run: |
|
run: |
|
||||||
./tools/packaging/kata-deploy/local-build/kata-deploy-merge-builds.sh kata-artifacts versions.yaml
|
./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
|
- name: store-artifacts
|
||||||
uses: actions/upload-artifact@ea165f8d65b6e75b540449e92b4886f43607fa02 # v4.6.2
|
uses: actions/upload-artifact@ea165f8d65b6e75b540449e92b4886f43607fa02 # v4.6.2
|
||||||
with:
|
with:
|
||||||
|
@@ -4,12 +4,15 @@
|
|||||||
# SPDX-License-Identifier: Apache-2.0
|
# SPDX-License-Identifier: Apache-2.0
|
||||||
#
|
#
|
||||||
|
|
||||||
[ -z "${DEBUG}" ] || set -x
|
[[ -z "${DEBUG}" ]] || set -x
|
||||||
set -o errexit
|
set -o errexit
|
||||||
set -o nounset
|
set -o nounset
|
||||||
set -o pipefail
|
set -o pipefail
|
||||||
set -o errtrace
|
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_build_dir=${1:-build}
|
||||||
kata_versions_yaml_file=${2:-""}
|
kata_versions_yaml_file=${2:-""}
|
||||||
|
|
||||||
@@ -23,17 +26,23 @@ mkdir "${tarball_content_dir}"
|
|||||||
|
|
||||||
for c in kata-static-*.tar.xz
|
for c in kata-static-*.tar.xz
|
||||||
do
|
do
|
||||||
echo "untarring tarball "${c}" into ${tarball_content_dir}"
|
echo "untarring tarball \"${c}\" into ${tarball_content_dir}"
|
||||||
tar -xvf "${c}" -C "${tarball_content_dir}"
|
tar -xvf "${c}" -C "${tarball_content_dir}"
|
||||||
done
|
done
|
||||||
|
|
||||||
pushd ${tarball_content_dir}
|
pushd "${tarball_content_dir}"
|
||||||
shim="containerd-shim-kata-v2"
|
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}"}
|
prefix=${shim_path%"bin/${shim}"}
|
||||||
|
|
||||||
echo "$(git describe --tags)" > ${prefix}/VERSION
|
if [[ "${RELEASE:-no}" == "yes" ]] && [[ -f "${repo_root_dir}/VERSION" ]]; then
|
||||||
[[ -n "${kata_versions_yaml_file}" ]] && cp ${kata_versions_yaml_file_path} ${prefix}/
|
# 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
|
popd
|
||||||
|
|
||||||
echo "create ${tar_path}"
|
echo "create ${tar_path}"
|
||||||
|
Reference in New Issue
Block a user