From f891fe4423ac2a2acc08efccdd6e26324b820518 Mon Sep 17 00:00:00 2001 From: Michael Telatynski <7t3chguy@gmail.com> Date: Fri, 25 Oct 2024 12:15:00 +0100 Subject: [PATCH] Fix gitflow workflow not handling edge case (#4463) of not needing to reset package to `#develop` Signed-off-by: Michael Telatynski <7t3chguy@gmail.com> --- .github/workflows/release-gitflow.yml | 7 +++---- 1 file changed, 3 insertions(+), 4 deletions(-) diff --git a/.github/workflows/release-gitflow.yml b/.github/workflows/release-gitflow.yml index a04f545f5f..282e45ebbd 100644 --- a/.github/workflows/release-gitflow.yml +++ b/.github/workflows/release-gitflow.yml @@ -61,26 +61,25 @@ jobs: CURRENT_VERSION=$(cat package.json | jq -r .dependencies[\"$PACKAGE\"]) echo "Current $PACKAGE version is $CURRENT_VERSION" - if [ "$CURRENT_VERSION" == "null" ] + if [[ "$CURRENT_VERSION" == "null" ]] then echo "Unable to find $PACKAGE in package.json" exit 1 fi - if [ "$CURRENT_VERSION" == "develop" ] + if [[ "$CURRENT_VERSION" == *"#develop" ]] then echo "Not updating dependency $PACKAGE" continue fi - echo "Resetting $1 to develop branch..." + echo "Resetting $PACKAGE to develop branch..." yarn add "github:matrix-org/$PACKAGE#develop" git add -u git commit -m "Reset $PACKAGE back to develop branch" done <<< "$DEPENDENCIES" env: DEPENDENCIES: ${{ inputs.dependencies }} - FINAL: ${{ inputs.final }} - name: Push changes run: git push origin develop