This repository has been archived by the owner on Sep 23, 2021. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 10
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
ci(docs): generate docs independently
Signed-off-by: Hector Rondon <[email protected]>
- Loading branch information
Hector Rondon
committed
Sep 17, 2018
1 parent
82794c1
commit c0f2ff6
Showing
2 changed files
with
63 additions
and
12 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 |
---|---|---|
@@ -0,0 +1,42 @@ | ||
#!/bin/bash | ||
|
||
if [[ $CIRCLE_BRANCH == "develop" ]]; then | ||
|
||
# Get old version number from package.json | ||
export GIT_OLD_TAG=$(jq -r ".version" package.json) | ||
# Generate CHANGELOG.md and increment version | ||
IS_PRERELEASE="$( cut -d '-' -f 2 <<< "$GIT_OLD_TAG" )"; | ||
|
||
if [[ $GIT_OLD_TAG != "$IS_PRERELEASE" ]]; then | ||
|
||
PREFIX_PRERELEASE="$( cut -d '.' -f 1 <<< "$IS_PRERELEASE" )"; | ||
yarn release -t '' --skip.changelog=true --skip.tag=true -m "ci(release): generate CHANGELOG.md for version %s" --prerelease "$PREFIX_PRERELEASE" | ||
|
||
else | ||
|
||
yarn release -t '' --skip.changelog=true --skip.tag=true -m "ci(release): generate CHANGELOG.md for version %s" | ||
|
||
fi | ||
|
||
fi | ||
|
||
# Get version number from package.json | ||
export GIT_TAG=$(jq -r ".version" package.json) | ||
# Update CFBundleShortVersionString | ||
/usr/libexec/PlistBuddy -c "Set :CFBundleShortVersionString ${GIT_TAG}" ${PWD}/${APPNAME}/Info.plist | ||
# Update CFBundleVersion | ||
/usr/libexec/PlistBuddy -c "Set :CFBundleVersion $CIRCLE_BUILD_NUM" ${PWD}/${APPNAME}/Info.plist | ||
# Add modified and delete files | ||
git add ${APPNAME}/Info.plist | ||
git commit --amend --no-edit | ||
|
||
echo "Generate documentation with jazzy" | ||
# Generate documentation with jazzy | ||
jazzy | ||
mv docs/ code-documentation/ | ||
# Add docs folder | ||
git add code-documentation -f | ||
# Create commit, NOTICE: this commit is not sent | ||
git commit -m "ci(docs): generate **docs** for version ${GIT_TAG}" | ||
# Update documentation on gh-pages branch | ||
yarn gh-pages --dist code-documentation --dest "${DOCUMENTATION_DESTINATION}${CIRCLE_BRANCH}" -m "ci(docs): generate documentation with jazzy for version ${GIT_TAG}" |