newspack-scripts 3.0.0-alpha.4 → 3.0.0-alpha.5
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/package.json +1 -1
- package/post-release.sh +9 -1
package/package.json
CHANGED
package/post-release.sh
CHANGED
|
@@ -1,5 +1,7 @@
|
|
|
1
1
|
#!/usr/bin/env bash
|
|
2
2
|
|
|
3
|
+
# This script should be ran on CI after a new regular (not pre-release) version is released.
|
|
4
|
+
|
|
3
5
|
git config user.name "$GIT_COMMITTER_NAME"
|
|
4
6
|
git config user.email "$GITHUB_COMMITER_EMAIL"
|
|
5
7
|
|
|
@@ -9,7 +11,7 @@ SECOND_TO_LAST_COMMIT_MSG=$(git log -n 1 --skip 1 --pretty=format:"%s")
|
|
|
9
11
|
|
|
10
12
|
LATEST_VERSION_TAG=$(git describe --tags --abbrev=0)
|
|
11
13
|
|
|
12
|
-
# If the merge was from alpha branch, alpha branch should be reset.
|
|
14
|
+
# If the merge was from alpha branch (the basic flow), alpha branch should be reset.
|
|
13
15
|
if [[ $(echo $SECOND_TO_LAST_COMMIT_MSG | grep '^Merge .*alpha') ]]; then
|
|
14
16
|
echo '[newspack-scripts] Release was created from the alpha branch. Alpha branch will now be reset.'
|
|
15
17
|
|
|
@@ -21,6 +23,12 @@ if [[ $(echo $SECOND_TO_LAST_COMMIT_MSG | grep '^Merge .*alpha') ]]; then
|
|
|
21
23
|
git reset --hard release --
|
|
22
24
|
# Force-push the alpha branch.
|
|
23
25
|
git push "https://$GITHUB_TOKEN@github.com/$CIRCLE_PROJECT_USERNAME/$CIRCLE_PROJECT_REPONAME.git" --force
|
|
26
|
+
else
|
|
27
|
+
echo '[newspack-scripts] Release was created from a different branch than the alpha branch (e.g. a hotfix branch).'
|
|
28
|
+
echo '[newspack-scripts] Alpha branch will now be updated with the lastest changes from release.'
|
|
29
|
+
git checkout alpha
|
|
30
|
+
git merge release --strategy-option=theirs --message="Merge release into alpha"
|
|
31
|
+
git push "https://$GITHUB_TOKEN@github.com/$CIRCLE_PROJECT_USERNAME/$CIRCLE_PROJECT_REPONAME.git"
|
|
24
32
|
fi
|
|
25
33
|
|
|
26
34
|
# Update master branch with latest changes from the release branch, so they are in sync.
|