-
Notifications
You must be signed in to change notification settings - Fork 72
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Create bump version script and bump version
Signed-off-by: Jakub Dzikowski <[email protected]>
- Loading branch information
Showing
18 changed files
with
63 additions
and
23 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,40 @@ | ||
#!/usr/bin/env bash | ||
|
||
set -eu | ||
|
||
old_version=$(< package.json jq -r '.version') | ||
ver_arg="${1:-unstable}" | ||
|
||
if [ "$ver_arg" = "patch" ] || [ "$ver_arg" = "minor" ] || [ "$ver_arg" = "major" ]; then | ||
new_version=$(semver "$old_version" -i "$ver_arg") | ||
elif [ "$ver_arg" = "unstable" ]; then | ||
new_version=$(semver "$old_version" -i prerelease --preid unstable) | ||
else | ||
echo "Invalid version parameter: $ver_arg" | ||
echo "Usage: $0 [patch|minor|major|unstable]" | ||
exit 1 | ||
fi | ||
|
||
echo "Updating version from $old_version to $new_version" | ||
echo -n " - package.json... " | ||
npm version "$new_version" --no-git-tag-version > /dev/null | ||
echo "done" | ||
|
||
echo -n " - FABLO_VERSION... " | ||
perl -i -pe "s/FABLO_VERSION=\"[^\"]*\"/FABLO_VERSION=\"${new_version}\"/g" fablo.sh | ||
perl -i -pe "s/FABLO_VERSION=\"[^\"]*\"/FABLO_VERSION=\"${new_version}\"/g" e2e/__snapshots__/* | ||
echo "done" | ||
|
||
echo -n " - JSON schema URL... " | ||
schema_update_pattern="s/download\/[0-9-.a-zA-Z]*\/schema.json/download\/${new_version}\/schema.json/g" | ||
perl -i -pe "$schema_update_pattern" README.md | ||
perl -i -pe "$schema_update_pattern" docs/schema.json | ||
perl -i -pe "$schema_update_pattern" samples/*.json | ||
perl -i -pe "$schema_update_pattern" samples/*.yaml | ||
perl -i -pe "$schema_update_pattern" e2e/__snapshots__/* | ||
echo "done" | ||
|
||
echo -n " - download URL... " | ||
download_update_pattern="s/download\/[0-9-.a-zA-Z]*\/fablo.sh/download\/${new_version}\/fablo.sh/g" | ||
perl -i -pe "$download_update_pattern" README.md | ||
echo "done" |
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
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Oops, something went wrong.
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,6 +1,6 @@ | ||
{ | ||
"name": "generator-fablo", | ||
"version": "1.2.0", | ||
"version": "1.2.1-unstable.0", | ||
"description": "Fablo is a simple tool to generate the Hyperledger Fabric blockchain network and run it on Docker. It supports RAFT and solo consensus protocols, multiple organizations and channels, chaincode installation and upgrade.", | ||
"author": "Piotr Hejwowski <[email protected]>, Jakub Dzikowski <[email protected]>", | ||
"repository": { | ||
|
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
2 changes: 1 addition & 1 deletion
2
samples/fablo-config-hlf1.4-2orgs-2chaincodes-private-data.yaml
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
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