-
Notifications
You must be signed in to change notification settings - Fork 144
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Modify `updateversions.sh` script so that it runs on default MacOS bash version. Signed-off-by: Mark S. Lewis <Mark.S.Lewis@outlook.com>
- Loading branch information
1 parent
753bf8a
commit 57fd694
Showing
23 changed files
with
82 additions
and
72 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
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 |
---|---|---|
|
@@ -107,7 +107,7 @@ | |
} | ||
}, | ||
"info": { | ||
"version": "2.5.3", | ||
"version": "2.5.4", | ||
"title": "ts_chaincode" | ||
}, | ||
"components": { | ||
|
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
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,24 +1,23 @@ | ||
#!/bin/bash | ||
# Note uses bash4.4 or later features, and sponge from GNU moreutils | ||
#!/usr/bin/env bash | ||
|
||
set -eo pipefail | ||
|
||
if [ -z $1 ]; then | ||
echo "Need to have the first arg set to the new package.json version " | ||
if [ -z "$1" ]; then | ||
echo "Need to have the first arg set to the new package.json version" | ||
exit 1 | ||
fi | ||
|
||
NEW_VERSION=$1 | ||
NEW_VERSION="$1" | ||
echo "Setting new version to '${NEW_VERSION}'" | ||
|
||
readarray -d '' PACKAGES < <(find . -name package.json -not -path '*/node_modules/*' -not -path '*/common/*') | ||
|
||
for PACKAGE in ${PACKAGES} | ||
do | ||
echo "Updating '${PACKAGE}'" | ||
jq --arg VER "${NEW_VERSION}" '.version=$VER' "${PACKAGE}" | sponge "${PACKAGE}" | ||
done | ||
while read -r PACKAGE; do | ||
echo "Updating '${PACKAGE}'" | ||
( cd "$(dirname "${PACKAGE}")" && npm --allow-same-version --no-git-tag-version version "${NEW_VERSION}" ) | ||
done <<< "$(find . -type d \( -name node_modules -o -name common \) -prune -o -type f -name package.json -print)" | ||
|
||
MAJOR_MINOR=$(cut -d. -f-2 <<< "${NEW_VERSION}") | ||
|
||
echo "Please also check these files" | ||
echo "Please also check these files containing ${MAJOR_MINOR}.n" | ||
# NB - the grep regexp syntax is a little different | ||
find . -name "*.js" -not -path '*/node_modules/*' -not -path '*/common/*' | xargs grep "2\.4\.\?[0-9]" | ||
MAJOR_MINOR_REGEX="${MAJOR_MINOR/./\.}\.\?[0-9]" | ||
find . -type d \( -name node_modules -o -name common \) -prune -o -type f -name '*.js' -exec grep "${MAJOR_MINOR_REGEX}" {} + |
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