Skip to content

Commit 31df15a

Browse files
committed
Final touches on set_version script notes.
1 parent 26eb517 commit 31df15a

File tree

1 file changed

+3
-2
lines changed

1 file changed

+3
-2
lines changed

set_version renamed to set_version.sh

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,15 +1,16 @@
11
#!/bin/sh --
22
#
33
# This script sets version number entries in various files in the BlocklyPropClient project.
4+
# Works in Ubuntu and OS X.
45
#
56
# Usage: $ ./set_version "1.2.3"
67

78

89
#
910
# Error if no version string declared
1011
#
12+
# if [ $1X == X ] <-- this doesn't work in Ubuntu
1113
if [ -z "$1" ]
12-
#if [ $1X == X ] <-- this doesn't work in Ubuntu
1314
then
1415
echo "ERROR: Must specify a version number. Ex: \$ $0 \"1.2.3\""
1516
exit 1
@@ -32,8 +33,8 @@ VERSION=$1
3233
# grep and sed, must use an expanded pattern for text where each letter is expressed in both upper/lower case.
3334
# ex: Ver should be [vV][eE][rR]
3435
#
36+
# function FindAndSetVersion { <-- this doesn't work in Ubuntu
3537
FindAndSetVersion() {
36-
#function FindAndSetVersion { <-- this doesn't work in Ubuntu
3738
if grep -q -E ${VERSIONPATTERN} ${VERSIONFILE} ; then
3839
if sed -i.bak -E "s/${VERSIONPATTERN}/${VERSIONSTRING}/" ${VERSIONFILE} ; then
3940
echo "Updated file \"${VERSIONFILE}\" to include: ${VERSIONSTRING}"

0 commit comments

Comments
 (0)