Skip to content

Commit 24693d4

Browse files
committed
chore: bump version without depending on previous
also update description
1 parent 474a41e commit 24693d4

File tree

2 files changed

+6
-6
lines changed

2 files changed

+6
-6
lines changed

bump_version.sh

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -7,9 +7,9 @@
77
# Replaces a string in a file.
88
replace() {
99
if [[ "$OSTYPE" == "darwin"* ]]; then
10-
sed -i '' -e "s|$2|$3|g" "$1"
10+
sed -i '' -E "s|$2|$3|g" "$1"
1111
else
12-
sed -i -e "s|$2|$3|g" "$1"
12+
sed -i -r -e "s|$2|$3|g" "$1"
1313
fi
1414
cd "$(dirname "$1")" || echo "Change to directory containing the file failed."
1515
if ! git status --porcelain 2>/dev/null | grep "$(basename "$1")"; then
@@ -19,5 +19,5 @@ replace() {
1919
echo "Updated file: $1"
2020
}
2121

22-
replace package.json "version\": \"$1\"" "version\": \"$2\""
23-
replace src/Constants.ts "SDK_VERSION: '$1'" "SDK_VERSION: '$2'"
22+
replace package.json "version\": \"[a-z0-9\.\-]+\"" "version\": \"$1\""
23+
replace src/Constants.ts "SDK_VERSION: '[a-z0-9\.\-]+'" "SDK_VERSION: '$1'"

package.json

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -45,7 +45,7 @@
4545
"webpack-cli": "^3.3.11"
4646
},
4747
"name": "leanplum-sdk",
48-
"description": "This is the JavaScript SDK for Leanplum, allowing developers to access and integrate the functionality of Leanplum with applications and devices through JavaScript and HTML5. Leanplum is an application development platform that provides mobile A/B testing, messaging functionality, personalization, and more features for applications. ## Installation Add leanplum.js to your project: ```javascript <script type=\"text/javascript\" src=\"leanplum.js\"></script> ``` ## Usage Initialize Leanplum.",
48+
"description": "The JavaScript SDK for Leanplum allows developers to integrate the Leanplum platform with applications that use JavaScript and HTML5. Leanplum is an customer engagement platform that provides mobile A/B testing, messaging, and personalization features for websites and web applications.",
4949
"version": "1.9.1-develop.2",
5050
"main": "dist/leanplum.min.js",
5151
"types": "dist/leanplum.d.ts",
@@ -86,7 +86,7 @@
8686
[
8787
"@semantic-release/exec",
8888
{
89-
"prepareCmd": "./bump_version.sh ${lastRelease.version} ${nextRelease.version}"
89+
"prepareCmd": "./bump_version.sh ${nextRelease.version}"
9090
}
9191
]
9292
]

0 commit comments

Comments
 (0)