mirror of
https://github.com/argoproj/argo-cd.git
synced 2026-04-04 15:58:49 +02:00
* chore: generate attestations during a release Signed-off-by: Justin Marquis <34fathombelow@protonmail.com> enable attestation for dockerhub Signed-off-by: Justin Marquis <34fathombelow@protonmail.com> release assests no longer compressed Signed-off-by: Justin Marquis <34fathombelow@protonmail.com> renamed attestion for cli Signed-off-by: Justin Marquis <34fathombelow@protonmail.com> updated docs to reflect non compressed cli binaries Signed-off-by: Justin Marquis <34fathombelow@protonmail.com> use quay username for provenance generator Signed-off-by: Justin Marquis <34fathombelow@protonmail.com> add check for TARGET_VERSION Signed-off-by: Justin Marquis <34fathombelow@protonmail.com> fixed typo Signed-off-by: Justin Marquis <34fathombelow@protonmail.com> updated go to 1.19 Signed-off-by: Justin Marquis <34fathombelow@protonmail.com> update cosign and slsa-github-generators Signed-off-by: Justin Marquis <34fathombelow@protonmail.com> update docs for cosignv2.0.0 Signed-off-by: Justin Marquis <34fathombelow@protonmail.com> remove docker registry from release Signed-off-by: Justin Marquis <34fathombelow@protonmail.com> * negate tags for v2.4,v2.5,v2.6 for release Signed-off-by: Justin Marquis <34fathombelow@protonmail.com> * bug fix for release notes Signed-off-by: Justin Marquis <34fathombelow@protonmail.com> --------- Signed-off-by: Justin Marquis <34fathombelow@protonmail.com> Signed-off-by: Michael Crenshaw <350466+crenshaw-dev@users.noreply.github.com> Co-authored-by: Michael Crenshaw <350466+crenshaw-dev@users.noreply.github.com>
57 lines
1.7 KiB
Bash
Executable File
57 lines
1.7 KiB
Bash
Executable File
#!/usr/bin/env bash
|
|
|
|
# This script requires bash shell - sorry.
|
|
|
|
NEW_TAG="${1}"
|
|
GIT_REMOTE="${2}"
|
|
|
|
set -ue
|
|
|
|
if test "${NEW_TAG}" = "" -o "${GIT_REMOTE}" = ""; then
|
|
echo "!! Usage: $0 <release tag> <remote>" >&2
|
|
exit 1
|
|
fi
|
|
|
|
# Target (version) tag must match version scheme vMAJOR.MINOR.PATCH with an
|
|
# optional pre-release tag.
|
|
if ! echo "${NEW_TAG}" | egrep -q '^v[0-9]+\.[0-9]+\.[0-9]+(-rc[0-9]+)*$'; then
|
|
echo "!! Malformed version tag: '${NEW_TAG}', must match 'vMAJOR.MINOR.PATCH(-rcX)'" >&2
|
|
exit 1
|
|
fi
|
|
|
|
# Check whether we are in correct branch of local repository
|
|
RELEASE_BRANCH="${NEW_TAG%\.[0-9]*}"
|
|
RELEASE_BRANCH="release-${RELEASE_BRANCH#*v}"
|
|
|
|
currentBranch=$(git branch --show-current)
|
|
if test "$currentBranch" != "${RELEASE_BRANCH}"; then
|
|
echo "!! Please checkout branch '${RELEASE_BRANCH}' (currently in branch: '${currentBranch}')" >&2
|
|
exit 1
|
|
fi
|
|
|
|
echo ">> Working in release branch '${RELEASE_BRANCH}'"
|
|
|
|
echo ">> Ensuring release branch is up to date."
|
|
# make sure release branch is up to date
|
|
git pull ${GIT_REMOTE} ${RELEASE_BRANCH}
|
|
|
|
# Check for target (version) tag in local repo
|
|
if git tag -l | grep -q -E "^${NEW_TAG}$"; then
|
|
echo "!! Target version tag '${NEW_TAG}' already exists in local repository" >&2
|
|
exit 1
|
|
fi
|
|
|
|
# Check for target (version) tag in remote repo
|
|
if git ls-remote ${GIT_REMOTE} refs/tags/${NEW_TAG} | grep -q -E "${NEW_TAG}$"; then
|
|
echo "!! Target version tag '${NEW_TAG}' already exists in remote '${GIT_REMOTE}'" >&2
|
|
exit 1
|
|
fi
|
|
|
|
echo ">> Creating new release '${NEW_TAG}' by pushing '${NEW_TAG}' to '${GIT_REMOTE}'"
|
|
|
|
# Create new tag in local repository
|
|
git tag ${NEW_TAG}
|
|
|
|
# Push the new tag to remote repository
|
|
git push ${GIT_REMOTE} ${NEW_TAG}
|