mirror of
https://github.com/kata-containers/kata-containers.git
synced 2025-08-10 04:18:26 +00:00
Merge pull request #83 from jcvenegas/kernel-tag
release: tag: tag kernel build
This commit is contained in:
commit
5bdad695b2
@ -86,25 +86,30 @@ tag_repos() {
|
|||||||
info "Creating tag ${kata_version} in all repos"
|
info "Creating tag ${kata_version} in all repos"
|
||||||
for repo in "${repos[@]}"; do
|
for repo in "${repos[@]}"; do
|
||||||
git clone --quiet "https://github.com/${OWNER}/${repo}.git"
|
git clone --quiet "https://github.com/${OWNER}/${repo}.git"
|
||||||
pushd "${repo}"
|
pushd "${repo}" >> /dev/null
|
||||||
git remote set-url --push origin "git@github.com:${OWNER}/${repo}.git"
|
git remote set-url --push origin "git@github.com:${OWNER}/${repo}.git"
|
||||||
git fetch origin --tags
|
git fetch origin --tags
|
||||||
if git rev-parse -q --verify "refs/tags/${kata_version}"; then
|
tag="$kata_version"
|
||||||
|
[[ "packaging" == "${repo}" ]] && tag="${tag}-kernel-config"
|
||||||
|
if git rev-parse -q --verify "refs/tags/${tag}"; then
|
||||||
info "$repo already has tag "
|
info "$repo already has tag "
|
||||||
else
|
else
|
||||||
info "Creating tag ${kata_version} for ${repo}"
|
info "Creating tag ${tag} for ${repo}"
|
||||||
git tag -a "${kata_version}" -s -m "${PROJECT} release ${kata_version}"
|
git tag -a "${tag}" -s -m "${PROJECT} release ${tag}"
|
||||||
fi
|
fi
|
||||||
popd
|
popd >> /dev/null
|
||||||
done
|
done
|
||||||
}
|
}
|
||||||
|
|
||||||
push_tags() {
|
push_tags() {
|
||||||
info "Pushing tags to repos"
|
info "Pushing tags to repos"
|
||||||
for repo in "${repos[@]}"; do
|
for repo in "${repos[@]}"; do
|
||||||
pushd "${repo}"
|
pushd "${repo}" >> /dev/null
|
||||||
git push origin "${kata_version}"
|
tag="$kata_version"
|
||||||
popd
|
[[ "packaging" == "${repo}" ]] && tag="${tag}-kernel-config"
|
||||||
|
info "Creating tag ${tag} for ${repo}"
|
||||||
|
git push origin "${tag}"
|
||||||
|
popd >> /dev/null
|
||||||
done
|
done
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -120,7 +125,7 @@ subcmd=${1:-""}
|
|||||||
|
|
||||||
[ -z "${subcmd}" ] && usage && exit 0
|
[ -z "${subcmd}" ] && usage && exit 0
|
||||||
|
|
||||||
pushd "${tmp_dir}"
|
pushd "${tmp_dir}" >> /dev/null
|
||||||
|
|
||||||
case "${subcmd}" in
|
case "${subcmd}" in
|
||||||
status)
|
status)
|
||||||
@ -131,6 +136,7 @@ tag)
|
|||||||
# Tag versions that does not have VERSIONS file
|
# Tag versions that does not have VERSIONS file
|
||||||
# But we want to know the version compatible with a kata release.
|
# But we want to know the version compatible with a kata release.
|
||||||
repos+=("tests")
|
repos+=("tests")
|
||||||
|
repos+=("packaging")
|
||||||
tag_repos
|
tag_repos
|
||||||
if [ "${PUSH}" == "true" ]; then
|
if [ "${PUSH}" == "true" ]; then
|
||||||
push_tags
|
push_tags
|
||||||
@ -144,4 +150,4 @@ tag)
|
|||||||
|
|
||||||
esac
|
esac
|
||||||
|
|
||||||
popd
|
popd >> /dev/null
|
||||||
|
Loading…
Reference in New Issue
Block a user