Skip to content

Commit

Permalink
Merge pull request #10 from PAYONE-GmbH/release/1.0.0
Browse files Browse the repository at this point in the history
Release/1.0.0
  • Loading branch information
Blackfaded authored Aug 22, 2024
2 parents 22816a3 + ed16fd2 commit 5099c04
Show file tree
Hide file tree
Showing 7 changed files with 29 additions and 14 deletions.
4 changes: 3 additions & 1 deletion CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,7 +1,9 @@
## 0.0.1 (2024-08-21)
## 0.0.1 (2024-08-22)

### Documentation

* docs: add apple pay transformer usage to readme ([cad0caeae8a87a127cc5d8b4361ffb3d40701177](https://github.com/PAYONE-GmbH/PCP-ServerSDK-java/commit/cad0caeae8a87a127cc5d8b4361ffb3d40701177))
* docs: add contributing guidelines and update readme ([ebdae42561c980a022650fef5154b84fe853379c](https://github.com/PAYONE-GmbH/PCP-ServerSDK-java/commit/ebdae42561c980a022650fef5154b84fe853379c))
* docs: update readme ([035d54c32c5a969474ebaec68de3749fcb6a7684](https://github.com/PAYONE-GmbH/PCP-ServerSDK-java/commit/035d54c32c5a969474ebaec68de3749fcb6a7684))

### Features
Expand Down
4 changes: 2 additions & 2 deletions package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

4 changes: 2 additions & 2 deletions package.json
Original file line number Diff line number Diff line change
@@ -1,9 +1,9 @@
{
"name": "pcp-serversdk-java",
"version": "0.0.1",
"version": "1.0.0",
"type": "commonjs",
"scripts": {
"changelog": "conventional-changelog -i CHANGELOG.md -s -r 0 --config ./changelog.config.js"
"changelog": "conventional-changelog -i CHANGELOG.md -s --config ./changelog.config.js"
},
"repository": {
"type": "git",
Expand Down
2 changes: 1 addition & 1 deletion pcp_serversdk_python/utils/ServerMetaInfo.py
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,6 @@ def __init__(self, integrator: str = ""):
self.platformIdentifier = (
f"{platform.system()}, Python version is: {platform.python_version()}"
)
self.sdkIdentifier = "PythonServerSDK/v0.0.3" # Update version as needed
self.sdkIdentifier = "PythonServerSDK/v1.0.0" # Update version as needed
self.sdkCreator = "PAYONE GmbH"
self.integrator = integrator
23 changes: 18 additions & 5 deletions scripts.sh
Original file line number Diff line number Diff line change
Expand Up @@ -48,23 +48,36 @@ version() {
SETUP_PY_PATH='./setup.py'
SERVER_META_INFO_PATH='./pcp_serversdk_python/utils/ServerMetaInfo.py'
SERVER_META_INFO_TEST_PATH='./tests/utils/test_ServerMetaInfo.py'
PACKAGE_JSON_PATH="./package.json"
PACKAGE_LOCK_JSON_PATH="./package-lock.json"
echo "Getting the version..."
sed -i '' "s/version=\"[0-9]*\.[0-9]*\.[0-9]*\",/version=\"$NEW_VERSION\",/" ${SETUP_PY_PATH}
sed -i '' "s/PythonServerSDK\/v[0-9]*\.[0-9]*\.[0-9]*/PythonServerSDK\/v$NEW_VERSION/" ${SERVER_META_INFO_PATH}
sed -i '' "s/PythonServerSDK\/v[0-9]*\.[0-9]*\.[0-9]*/PythonServerSDK\/v$NEW_VERSION/" ${SERVER_META_INFO_TEST_PATH}

echo "Version complete."
# Update the version number in the package.json file for changelog generation
sed -i '' -e "s/\"version\": \".*\"/\"version\": \"$VERSION\"/" package.json

# Update the version number in the package-lock.json file for changelog generation
jq --arg version "$VERSION" '
.version = $version |
.packages[""].version = $version
' package-lock.json >tmp.json && mv tmp.json package-lock.json
rm -f tmp.json

git add $SETUP_PY_PATH
git add $SERVER_META_INFO_PATH
git add $SERVER_META_INFO_TEST_PATH
echo "Updated $SETUP_PY_PATH with version $NEW_VERSION"
echo "Updated $SERVER_META_INFO_PATH with version $NEW_VERSION"
echo "Updated $SERVER_META_INFO_TEST_PATH with version $NEW_VERSION"
git add $PACKAGE_JSON_PATH
git add $PACKAGE_LOCK_JSON_PATH
npm install
npm run changelog
git add CHANGELOG.md
git tag -a v$NEW_VERSION -m "Version $NEW_VERSION"
echo "Updated CHANGELOG.md"
git commit -m "Update version to $VERSION"
git push origin tag v$NEW_VERSION
git push origin HEAD
echo "Version complete."
}

clear() {
Expand Down
2 changes: 1 addition & 1 deletion setup.py
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@

setup(
name="pcp_serversdk_python",
version="0.0.3",
version="1.0.0",
author="PAYONE-GmbH",
author_email="",
description="",
Expand Down
4 changes: 2 additions & 2 deletions tests/utils/test_ServerMetaInfo.py
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ def testServerMetaInfoInitialization():
assert meta_info.platformIdentifier == expected_platform_identifier

# Check sdkIdentifier
assert meta_info.sdkIdentifier == "PythonServerSDK/v0.0.3"
assert meta_info.sdkIdentifier == "PythonServerSDK/v1.0.0"

# Check sdkCreator
assert meta_info.sdkCreator == "PAYONE GmbH"
Expand All @@ -33,7 +33,7 @@ def testServerMetaInfoDefaults():
assert meta_info.platformIdentifier == expected_platform_identifier

# Check sdkIdentifier
assert meta_info.sdkIdentifier == "PythonServerSDK/v0.0.3"
assert meta_info.sdkIdentifier == "PythonServerSDK/v1.0.0"

# Check sdkCreator
assert meta_info.sdkCreator == "PAYONE GmbH"
Expand Down

0 comments on commit 5099c04

Please sign in to comment.