Skip to content

Commit

Permalink
changes on changelog and script
Browse files Browse the repository at this point in the history
  • Loading branch information
chathurapathiranage committed Aug 29, 2024
1 parent 35fdf20 commit 5d522f6
Show file tree
Hide file tree
Showing 3 changed files with 8 additions and 15 deletions.
4 changes: 2 additions & 2 deletions example/package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "example",
"version": "0.1.0",
"version": "0.1.1",
"private": true,
"scripts": {
"android": "./scripts/installer.sh android",
Expand All @@ -10,7 +10,7 @@
"test": "jest"
},
"dependencies": {
"@komoju/komoju-react-native": "0.1.0",
"@komoju/komoju-react-native": "0.1.1",
"i18next": "^23.11.5",
"react": "18.2.0",
"react-i18next": "^14.1.2",
Expand Down
2 changes: 1 addition & 1 deletion payment_sdk/package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "@komoju/komoju-react-native",
"version": "0.0.7",
"version": "0.1.0",
"private": false,
"description": "degica payment SDK",
"main": "dist/index.js",
Expand Down
17 changes: 5 additions & 12 deletions payment_sdk/scripts/publish.sh
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ EOF
}

percentEncodeString() {
node -p "encodeURIComponent('$1')"
jq -rn --arg x "$1" '$x|@uri'
}

create_github_release() {
Expand Down Expand Up @@ -128,27 +128,20 @@ npm run build
echo "Bumping package.json $RELEASE_TYPE version and tagging commit"
npm version $RELEASE_TYPE

# Extract the new version from package.json
NEW_VERSION=$(node -p "require('./package.json').version")

# Update the version in ../example/package.json
echo "Updating version in ../example/package.json to $NEW_VERSION"
node -p "const fs = require('fs'); const path = '../example/package.json'; const pkg = JSON.parse(fs.readFileSync(path, 'utf8')); pkg.version = '$NEW_VERSION'; fs.writeFileSync(path, JSON.stringify(pkg, null, 2))"

echo "Publishing release to npm"
npm publish --access=public

echo "Pushing git commit and tag"
# git add package.json ../example/package.json
# git commit -m "Update package.json and example package.json to version $NEW_VERSION"
git push --follow-tags

echo "Updating the main branch"
# echo "Pushing git changes to main brach"
# git add package.json
# git commit -m "package.json"
# git push origin main

echo "Publish successful!"
echo ""

create_github_release

echo "Done!"
echo "Done!"

0 comments on commit 5d522f6

Please sign in to comment.