We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 7c79cc3 commit f500bb0Copy full SHA for f500bb0
scripts/update-bower-version.sh
@@ -9,8 +9,17 @@ set -e
9
10
echo "diff2html updating bower version..."
11
12
-RELEASE_VERSION=$(cat package.json | grep "version" | head -1 | gsed -e 's/ "version": "\(.*\)",/\1/')
+if [[ "$OSTYPE" == "linux-gnu" ]]; then
13
+ SED_BIN=sed
14
+elif [[ "$OSTYPE" == "darwin"* ]]; then
15
+ SED_BIN=gsed
16
+else
17
+ echo "Cannot run this script in ${OSTYPE}"
18
+ exit 1
19
+fi
20
-gsed -i 's/.*"version".*/ "version": "'${RELEASE_VERSION}'",/' bower.json
21
+RELEASE_VERSION=$(cat package.json | grep "version" | head -1 | $SED_BIN -e 's/ "version": "\(.*\)",/\1/')
22
+
23
+$SED_BIN -i 's/.*"version".*/ "version": "'${RELEASE_VERSION}'",/' bower.json
24
25
echo "diff2html updated bower version successfully!"
0 commit comments