Skip to content

Commit 585d40f

Browse files
committed
Reset SDK deps back to develop after a release
This automates the (frequently forgotten) step of resetting SDK deps back to the develop branch after merging the release to develop.
1 parent a26bd6e commit 585d40f

1 file changed

Lines changed: 21 additions & 2 deletions

File tree

‎release.sh‎

Lines changed: 21 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -44,15 +44,34 @@ do
4444
fi
4545
done
4646

47-
# bump Electron's package.json first
4847
release="${1#v}"
4948
tag="v${release}"
50-
echo "electron yarn version"
49+
prerelease=0
50+
# We check if this build is a prerelease by looking to
51+
# see if the version has a hyphen in it. Crude,
52+
# but semver doesn't support postreleases so anything
53+
# with a hyphen is a prerelease.
54+
echo $release | grep -q '-' && prerelease=1
5155

56+
# bump Electron's package.json first
57+
echo "electron yarn version"
5258
cd electron_app
5359
yarn version --no-git-tag-version --new-version "$release"
5460
git commit package.json -m "$tag"
5561

5662
cd ..
5763

5864
exec ./node_modules/matrix-js-sdk/release.sh -u vector-im -z "$orig_args"
65+
66+
if [ $prerelease -eq 0 ]
67+
then
68+
# For a release, reset SDK deps back to the `develop` branch.
69+
for i in matrix-js-sdk matrix-react-sdk
70+
do
71+
echo "Resetting $i to develop branch..."
72+
yarn add github:matrix-org/$i#develop
73+
git add -u
74+
git commit -m "Reset $i back to develop branch"
75+
done
76+
git push origin develop
77+
fi

0 commit comments

Comments
 (0)