Skip to content

Commit

Permalink
chore: bump version without depending on previous
Browse files Browse the repository at this point in the history
also update description
  • Loading branch information
gyoshev committed Apr 12, 2022
1 parent 474a41e commit 24693d4
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 6 deletions.
8 changes: 4 additions & 4 deletions bump_version.sh
Original file line number Diff line number Diff line change
Expand Up @@ -7,9 +7,9 @@
# Replaces a string in a file.
replace() {
if [[ "$OSTYPE" == "darwin"* ]]; then
sed -i '' -e "s|$2|$3|g" "$1"
sed -i '' -E "s|$2|$3|g" "$1"
else
sed -i -e "s|$2|$3|g" "$1"
sed -i -r -e "s|$2|$3|g" "$1"
fi
cd "$(dirname "$1")" || echo "Change to directory containing the file failed."
if ! git status --porcelain 2>/dev/null | grep "$(basename "$1")"; then
Expand All @@ -19,5 +19,5 @@ replace() {
echo "Updated file: $1"
}

replace package.json "version\": \"$1\"" "version\": \"$2\""
replace src/Constants.ts "SDK_VERSION: '$1'" "SDK_VERSION: '$2'"
replace package.json "version\": \"[a-z0-9\.\-]+\"" "version\": \"$1\""
replace src/Constants.ts "SDK_VERSION: '[a-z0-9\.\-]+'" "SDK_VERSION: '$1'"
4 changes: 2 additions & 2 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -45,7 +45,7 @@
"webpack-cli": "^3.3.11"
},
"name": "leanplum-sdk",
"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.",
"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.",
"version": "1.9.1-develop.2",
"main": "dist/leanplum.min.js",
"types": "dist/leanplum.d.ts",
Expand Down Expand Up @@ -86,7 +86,7 @@
[
"@semantic-release/exec",
{
"prepareCmd": "./bump_version.sh ${lastRelease.version} ${nextRelease.version}"
"prepareCmd": "./bump_version.sh ${nextRelease.version}"
}
]
]
Expand Down

0 comments on commit 24693d4

Please sign in to comment.