Skip to content

Commit

Permalink
[3.4] Backport cherry-pick of etcd-io#14860: Trigger release in curre…
Browse files Browse the repository at this point in the history
…nt branch for github workflow case

Signed-off-by: ArkaSaha30 <[email protected]>
  • Loading branch information
ahrtr authored and ArkaSaha30 committed Mar 30, 2023
1 parent 6656a0d commit f5d4def
Show file tree
Hide file tree
Showing 2 changed files with 10 additions and 20 deletions.
22 changes: 10 additions & 12 deletions scripts/build-binary.sh
Original file line number Diff line number Diff line change
Expand Up @@ -5,8 +5,7 @@ set -e
source ./scripts/test_lib.sh

VER=$1
PROJ="etcd"
REPOSITORY="${REPOSITORY:-https://github.com/etcd-io/etcd.git}"
REPOSITORY="${REPOSITORY:-git@github.com:etcd-io/etcd.git}"

if [ -z "$1" ]; then
echo "Usage: ${0} VERSION" >> /dev/stderr
Expand All @@ -16,18 +15,17 @@ fi
set -u

function setup_env {
local proj=${1}
local ver=${2}
local ver=${1}
local proj=${2}

if [ ! -d "${proj}" ]; then
log_callout "Cloning ${REPOSITORY}..."
git clone "${REPOSITORY}"
fi
if [ ! -d "${proj}" ]; then
run git clone "${REPOSITORY}"
fi

pushd "${proj}" >/dev/null
git fetch --all
git checkout "${ver}"
popd >/dev/null
pushd "${proj}" >/dev/null
run git fetch --all
run git checkout "${ver}"
popd >/dev/null
}


Expand Down
8 changes: 0 additions & 8 deletions scripts/release.sh
Original file line number Diff line number Diff line change
Expand Up @@ -149,14 +149,6 @@ main() {
git tag --local-user "${KEYID}" --sign "${RELEASE_VERSION}" --message "${RELEASE_VERSION}"
fi

# Verify the latest commit has the version tag
# shellcheck disable=SC2155
local tag="$(git describe --exact-match HEAD)"
if [ "${tag}" != "${RELEASE_VERSION}" ]; then
log_error "Error: Expected HEAD to be tagged with ${RELEASE_VERSION}, but 'git describe --exact-match HEAD' reported: ${tag}"
exit 1
fi

if [ "${IN_PLACE}" == 0 ]; then
# Tried with `local branch=$(git branch -a --contains tags/"${RELEASE_VERSION}")`
# so as to work with both current branch and main/release-3.X.
Expand Down

0 comments on commit f5d4def

Please sign in to comment.