-
Notifications
You must be signed in to change notification settings - Fork 5
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
2 changed files
with
16 additions
and
7 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
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 |
---|---|---|
@@ -1,13 +1,23 @@ | ||
#!/bin/sh | ||
set -e | ||
|
||
# Git configuration | ||
git config user.name $GIT_USER_NAME | ||
git config user.email $GIT_USER_EMAIL | ||
|
||
# Build documentation | ||
yarn docs | ||
|
||
# Move to new branch based on master | ||
git checkout master | ||
git checkout -b docs/$CIRCLE_TAG | ||
|
||
# Apply modifications to minor version | ||
VERSION_TO_MINOR=$(echo $CIRCLE_TAG | sed -E 's/\.[0-9]+$//') | ||
rm -rf docs/immutadot/$VERSION_TO_MINOR | ||
mv docs/immutadot/$CIRCLE_TAG docs/immutadot/$VERSION_TO_MINOR | ||
git config user.name $GIT_USER_NAME | ||
git config user.email $GIT_USER_EMAIL | ||
git checkout master | ||
|
||
# Commit and push modifications | ||
git add docs/immutadot | ||
git commit -m ":memo: Publish documentation" | ||
git pull -r origin master && git push origin master | ||
git commit -m ":memo: Publish $CIRCLE_TAG documentation" | ||
git push --set-upstream origin docs/$CIRCLE_TAG |