generated from obsidianmd/obsidian-sample-plugin
-
Notifications
You must be signed in to change notification settings - Fork 85
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #1246 from pjkaufman/master
Prereleas Work
- Loading branch information
Showing
6 changed files
with
47 additions
and
5 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
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,28 @@ | ||
#!/usr/bin/env bash | ||
# Automatically update versions in files and commit changes | ||
|
||
set -e | ||
|
||
NEW_VERSION=$1 | ||
|
||
if [ -z "$NEW_VERSION" ]; then | ||
NEW_VERSION=$(jq -r ".version" manifest.json | awk -F. -v OFS=. '{$NF += 1 ; print}') | ||
fi | ||
|
||
echo "Releasing version '${NEW_VERSION}'" | ||
|
||
# Delete old files if they exist | ||
rm -f package.tmp.json | ||
rm -f manifest.tmp.json | ||
|
||
# Rewrite versions in relevant files. | ||
jq ".version=\"${NEW_VERSION}\"" package.json > package.tmp.json && mv package.tmp.json package.json | ||
jq ".version=\"${NEW_VERSION}\"" manifest.json > manifest.tmp.json && mv manifest.tmp.json manifest.json | ||
jq ". + {\"${NEW_VERSION}\": \"1.5.7\"}" versions.json > versions.tmp.json && mv versions.tmp.json versions.json | ||
|
||
npm run build && npm run docs | ||
|
||
# Create commit & commit. | ||
git commit -a -m "Auto-release ${NEW_VERSION}" | ||
git push | ||
|
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