diff --git a/.github/workflows/cicd.yml b/.github/workflows/cicd.yml index 591e9636a..863413a05 100644 --- a/.github/workflows/cicd.yml +++ b/.github/workflows/cicd.yml @@ -140,12 +140,6 @@ jobs: python -m scripts.bump_version_in_docs git add docs/* - - name: Evaluate | Verify upstream has NOT changed - # Last chance to abort before causing an error as another PR/push was applied to the upstream branch - # while this workflow was running. This is important because we are committing a version change - shell: bash - run: bash .github/workflows/verify_upstream.sh - - name: Release | Python Semantic Release id: release uses: python-semantic-release/python-semantic-release@02f2a5c74dbb6aa2989f10fc4af12cd8e6bf025f # v10.5.2 diff --git a/.github/workflows/verify_upstream.sh b/.github/workflows/verify_upstream.sh deleted file mode 100644 index 8444eba57..000000000 --- a/.github/workflows/verify_upstream.sh +++ /dev/null @@ -1,33 +0,0 @@ -#!/bin/bash - -set -eu +o pipefail - -# Example output of `git status -sb`: -# ## master...origin/master [behind 1] -# M .github/workflows/verify_upstream.sh -UPSTREAM_BRANCH_NAME="$(git status -sb | head -n 1 | awk -F '\\.\\.\\.' '{print $2}' | cut -d ' ' -f1)" -printf '%s\n' "Upstream branch name: $UPSTREAM_BRANCH_NAME" - -set -o pipefail - -if [ -z "$UPSTREAM_BRANCH_NAME" ]; then - printf >&2 '%s\n' "::error::Unable to determine upstream branch name!" - exit 1 -fi - -git fetch "${UPSTREAM_BRANCH_NAME%%/*}" - -if ! UPSTREAM_SHA="$(git rev-parse "$UPSTREAM_BRANCH_NAME")"; then - printf >&2 '%s\n' "::error::Unable to determine upstream branch sha!" - exit 1 -fi - -HEAD_SHA="$(git rev-parse HEAD)" - -if [ "$HEAD_SHA" != "$UPSTREAM_SHA" ]; then - printf >&2 '%s\n' "[HEAD SHA] $HEAD_SHA != $UPSTREAM_SHA [UPSTREAM SHA]" - printf >&2 '%s\n' "::error::Upstream has changed, aborting release..." - exit 1 -fi - -printf '%s\n' "Verified upstream branch has not changed, continuing with release..."