diff --git a/Makefile b/Makefile index 3819410..2069a87 100644 --- a/Makefile +++ b/Makefile @@ -26,16 +26,10 @@ lint: dependencies printf "Please update PHP version to 5.5 or above for code formatting."; \ fi -release: - @printf "releasing ${VERSION}..." - @printf ' ./lib/Version.php - @git changelog -t ${VERSION} - @git release ${VERSION} - clean: rm -rf \ composer.phar \ vendor \ composer.lock -.PHONY: bootstrap release clean +.PHONY: bootstrap clean diff --git a/README.md b/README.md index 40d8a28..8ea284e 100644 --- a/README.md +++ b/README.md @@ -56,7 +56,7 @@ Documentation is available at [segment.com/docs/sources/server/php](https://segm ## Releasing -Run `make release VERSION=`. It should automatically tag and release in composer +See [RELEASING.md](RELEASING.md). ## License diff --git a/RELEASING.md b/RELEASING.md index 8713e98..1b8dba2 100644 --- a/RELEASING.md +++ b/RELEASING.md @@ -1,6 +1,16 @@ Releasing ========= - 1. Run `VERSION=X.Y.Z make release` (where X.Y.Z is the new version). +Packagist learns about a new version from the tag and fetches the code from GitHub. +Nothing is uploaded, so there is no publish workflow and no credentials. - That's it! Composer will pick up the new tag and you can see the latest version at https://packagist.org/packages/segmentio/analytics-php. +1. Update `$SEGMENT_VERSION` in `lib/Version.php`. +2. In `HISTORY.md`, change the `Unreleased` heading to `X.Y.Z / YYYY-MM-DD`. +3. Open a PR and merge it to `master`. +4. Tag the merged commit — no `v` prefix: + + ``` + git tag X.Y.Z && git push origin X.Y.Z + ``` + +5. Confirm at https://packagist.org/packages/segmentio/analytics-php