From fdb6a5c60efdda240a4952c10ea3adb4dfa5e639 Mon Sep 17 00:00:00 2001 From: Kevin van Zonneveld Date: Thu, 28 Nov 2024 14:40:57 +0100 Subject: [PATCH] Release instructions --- README.md | 42 ++++++++++++++++-------------------------- release.sh | 5 +++++ 2 files changed, 21 insertions(+), 26 deletions(-) diff --git a/README.md b/README.md index 3ea2463..23c5c6c 100644 --- a/README.md +++ b/README.md @@ -139,7 +139,10 @@ To integrate Uppy with your PHP backend: 1. Include Uppy in your HTML: ```html - + ``` @@ -188,17 +191,17 @@ if ($response) { // Process the assembly result $assemblyId = $response->data['assembly_id']; $assemblyStatus = $response->data['ok']; - + // You can store the assembly information in your database // or perform any other necessary actions here - + // Log the response for debugging error_log('Transloadit Assembly Completed: ' . $assemblyId); error_log('Assembly Status: ' . ($assemblyStatus ? 'Success' : 'Failed')); - + // Optionally, you can write the response to a file file_put_contents('transloadit_response_' . $assemblyId . '.json', json_encode($response->data)); - + // Send a 200 OK response to Transloadit http_response_code(200); echo 'OK'; @@ -480,30 +483,17 @@ Feel free to fork this project. We will happily merge bug fixes or other small improvements. For bigger changes you should probably get in touch with us before you start to avoid not seeing them merged. -## Versioning - -This project implements the Semantic Versioning guidelines. +### Releasing a new version -Releases will be numbered with the following format: +To release, say `3.2.0` [Packagist](https://packagist.org/packages/transloadit/php-sdk), follow these steps: -`..` +1. Make sure `PACKAGIST_TOKEN` is set in your `.env` file +1. Make sure you are in main: `git checkout main` +1. Update `CHANGELOG.md` and `composer.json` +1. Commit: `git add CHANGELOG.md composer.json && git commit -m "Release 3.2.0"` +1. Tag, push, and release: `source .env && VERSION=3.2.0 ./release.sh` -And constructed with the following guidelines: - -- Breaking backward compatibility bumps the major (and resets the minor and patch) -- New additions without breaking backward compatibility bumps the minor (and resets the patch) -- Bug fixes and misc changes bumps the patch - -For more information on SemVer, please visit http://semver.org/. - -## Releasing a new version - -```bash -# 1. update CHANGELOG.md -# 2. update composer.json -# 3. commit all your work -source env.sh && VERSION=3.1.0 ./release.sh -``` +This project implements the [Semantic Versioning](http://semver.org/) guidelines. ## License diff --git a/release.sh b/release.sh index 613845a..566ddb9 100755 --- a/release.sh +++ b/release.sh @@ -5,6 +5,11 @@ set -o nounset set -o pipefail # set -o xtrace +if [[ -z "${PACKAGIST_TOKEN}" ]]; then + echo "PACKAGIST_TOKEN is not set" + exit 1 +fi + if ! grep "${VERSION}" composer.json > /dev/null 2>&1; then echo "First add '${VERSION}' to composer.json please" exit 1