-
-
Notifications
You must be signed in to change notification settings - Fork 2.3k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Add post-merge hook to update nightly versions
- Loading branch information
Showing
4 changed files
with
62 additions
and
13 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,15 @@ | ||
#!/bin/sh | ||
# Generated with husky-init and https://github.com/typicode/husky-4-to-6 | ||
. "$(dirname "$0")/_/husky.sh" | ||
|
||
# ATLASSIAN: Update self-published (nightly) versions as part of a merge. | ||
# Ideally, this would be done as part of a `pre-merge-commit` hook, | ||
# but git does not support modifying the index during a merge commit. | ||
# So, we hack it in this `post-merge` hook by immediately ammending the commit. | ||
# Note that in cases where the merge commit did not automatically succeed, | ||
# this hook will not be run. See comments in `pre-commit` hook for more. | ||
yarn update-self-published -a | ||
if [[ -f .git/MERGE_HEAD ]]; then | ||
rm .git/MERGE_HEAD | ||
fi | ||
git log -n 1 --pretty=tformat:%s%n%n%b | git commit -F - --amend |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters