Skip to content

Commit

Permalink
Fix gitflow workflow not handling edge case
Browse files Browse the repository at this point in the history
of not needing to reset package to `#develop`

Signed-off-by: Michael Telatynski <[email protected]>
  • Loading branch information
t3chguy committed Oct 18, 2024
1 parent 13a967a commit d19478f
Showing 1 changed file with 3 additions and 4 deletions.
7 changes: 3 additions & 4 deletions .github/workflows/release-gitflow.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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

0 comments on commit d19478f

Please sign in to comment.