-
Notifications
You must be signed in to change notification settings - Fork 31
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
whats new, fix home page text, and add update-release-branch.sh (#304)
- Loading branch information
1 parent
fbbaacf
commit 855c7cf
Showing
4 changed files
with
49 additions
and
13 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,28 @@ | ||
#!/bin/sh | ||
# Example: | ||
# update-release-branch.sh 6.3 | ||
|
||
set -e | ||
|
||
BRANCH=`echo "$1-release"` | ||
VERSION=`echo "$1.0"` | ||
|
||
echo "Updating branch to ${BRANCH}..." | ||
|
||
# Replace source links in docs and examples | ||
find docs -iname "*.md" -type f -exec sed -i '' -E "s/hubble.gl\/(tree|blob)\/(master|[0-9\.]+-release)/hubble.gl\/tree\/${BRANCH}/g" {} \; | ||
find examples -maxdepth 0 -iname "*.md" -type f -exec sed -i '' -E "s/hubble.gl\/(tree|blob)\/(master|[0-9\.]+-release)/hubble.gl\/tree\/${BRANCH}/g" {} \; | ||
find examples/*/src -iname "*.js" -type f -exec sed -i '' -E "s/hubble.gl\/(tree|blob)\/(master|[0-9\.]+-release)/hubble.gl\/tree\/${BRANCH}/g" {} \; | ||
|
||
# Bump dependencies in examples | ||
update_dep() { | ||
FILE=$1 | ||
VERSION=$2 | ||
cat $FILE | jq ".dependencies |= . + \ | ||
with_entries(select(.key | match(\"@?hubble.gl\")) | .value |= \"^${VERSION}\")" > temp | ||
mv temp $FILE | ||
} | ||
|
||
# https://stackoverflow.com/questions/4321456/find-exec-a-shell-function-in-linux | ||
export -f update_dep | ||
find examples/*/package.json -exec bash -c 'update_dep "$0" $1' {} $VERSION \; |
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