diff --git a/CHANGELOG.md b/CHANGELOG.md index a88496a..099840c 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,3 +1,11 @@ +# [1.0.0](https://github.com/PAYONE-GmbH/PCP-ServerSDK-php/compare/v0.1.0...v1.0.0) (2024-08-22) +### Features +* feat: provide updated api endpoints when calling getPredefinedHosts() ([3927c7eafe34b2ac9fb66dcecd9869b5dad644c8](https://github.com/PAYONE-GmbH/PCP-ServerSDK-php/commit/3927c7eafe34b2ac9fb66dcecd9869b5dad644c8)) + +### BREAKING CHANGE + +* When the host for CommunicatorConfiguration is provided +`getPredefinedHosts()` it now points to a different url # [0.1.0](https://github.com/PAYONE-GmbH/PCP-ServerSDK-php/compare/f7fc619bdc3a01a86a4d29d23946fa29d520fa31...v0.1.0) (2024-08-09) ### Bug Fixes * fix: allow nullables to be compatible with api responses ([3d505149080ad09d1b9fe8eaa5a20928e5531bff](https://github.com/PAYONE-GmbH/PCP-ServerSDK-php/commit/3d505149080ad09d1b9fe8eaa5a20928e5531bff)) diff --git a/composer.json b/composer.json index eb17e53..6cd444f 100644 --- a/composer.json +++ b/composer.json @@ -11,7 +11,7 @@ "name": "PAYONE GmbH" } ], - "version": "0.1.0", + "version": "1.0.0", "require": { "php": "~8.2||~8.3", "ext-curl": "*", diff --git a/package-lock.json b/package-lock.json index 1c941c1..4ce5405 100644 --- a/package-lock.json +++ b/package-lock.json @@ -1,12 +1,12 @@ { "name": "pcp-serversdk-php", - "version": "0.1.0", + "version": "1.0.0", "lockfileVersion": 3, "requires": true, "packages": { "": { "name": "pcp-serversdk-php", - "version": "0.1.0", + "version": "1.0.0", "license": "MIT", "devDependencies": { "@commitlint/cli": "19.4.0", diff --git a/package.json b/package.json index f077582..b62d1a4 100644 --- a/package.json +++ b/package.json @@ -3,9 +3,9 @@ "author": "PAYONE GmbH", "license": "MIT", "private": true, - "version": "0.1.0", + "version": "1.0.0", "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", diff --git a/prepare_release.sh b/prepare_release.sh index bd715ea..4d2a1a9 100755 --- a/prepare_release.sh +++ b/prepare_release.sh @@ -13,24 +13,26 @@ fi # Check if an argument is provided if [ -z "$VERSION" ]; then - echo "Error: No version number provided." - echo "Usage: $0 " - exit 1 + echo "Error: No version number provided." + echo "Usage: $0 " + exit 1 fi # Check if the argument matches the format int.int.int if [[ "$VERSION" =~ ^[0-9]+\.[0-9]+\.[0-9]+$ ]]; then - echo "Valid version number: $VERSION" + echo "Valid version number: $VERSION" else - echo "Error: Invalid version number format." - echo "Usage: $0 " - exit 1 + echo "Error: Invalid version number format." + echo "Usage: $0 " + exit 1 fi # tag should start with a 'v' TAG="v${VERSION}" COMMUNICATOR_CONFIG_CLASS_PATH="./src/PayoneCommercePlatform/Sdk/CommunicatorConfiguration.php" COMPOSER_JSON_PATH="./composer.json" +PACKAGE_JSON_PATH="./package.json" +PACKAGE_LOCK_JSON_PATH="./package-lock.json" SED_COMMUNICATOR_CONFIG_CMD=$(printf 's/public const SDK_VERSION = .[0-9]*\.[0-9]*\.[0-9]*./public const SDK_VERSION = %s/' "'${VERSION}'") @@ -38,22 +40,27 @@ SED_COMMUNICATOR_CONFIG_CMD=$(printf 's/public const SDK_VERSION = .[0-9]*\.[0-9 sed -i '' "$SED_COMMUNICATOR_CONFIG_CMD" $COMMUNICATOR_CONFIG_CLASS_PATH # Update the version number in the composer.json file -jq --arg version "$VERSION" '.version = $version' composer.json > tmp.json && mv tmp.json composer.json +jq --arg version "$VERSION" '.version = $version' composer.json >tmp.json && mv tmp.json composer.json # Update the version number in the package.json file -jq --arg version "$VERSION" '.version = $version' package.json > tmp.json && mv tmp.json package.json +jq --arg version "$VERSION" '.version = $version' package.json >tmp.json && mv tmp.json 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 "$COMMUNICATOR_CONFIG_CLASS_PATH" "$COMPOSER_JSON_PATH" -git commit -m "Update version to $VERSION" +git add $PACKAGE_JSON_PATH +git add $PACKAGE_LOCK_JSON_PATH +npm install +npm run changelog +git add CHANGELOG.md git tag -a $TAG -m "Release version $VERSION" +git commit -m "Update version to $VERSION" echo "Version updated to $VERSION and tagged in Git." echo "" echo "If this was a mistake, you can run" echo " git reset --soft HEAD~1" echo " git tag -d ${TAG}" - diff --git a/src/PayoneCommercePlatform/Sdk/CommunicatorConfiguration.php b/src/PayoneCommercePlatform/Sdk/CommunicatorConfiguration.php index 4654a1b..cd09ffc 100644 --- a/src/PayoneCommercePlatform/Sdk/CommunicatorConfiguration.php +++ b/src/PayoneCommercePlatform/Sdk/CommunicatorConfiguration.php @@ -4,7 +4,7 @@ class CommunicatorConfiguration { - public const SDK_VERSION = '0.1.0'; + public const SDK_VERSION = '1.0.0'; /** * Api key for the PAYONE Commerce Platform