Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 1 addition & 7 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -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 '<?php\nglobal $$SEGMENT_VERSION;\n$$SEGMENT_VERSION = "%b";\n' ${VERSION} > ./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
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -56,7 +56,7 @@ Documentation is available at [segment.com/docs/sources/server/php](https://segm

## Releasing

Run `make release VERSION=<version>`. It should automatically tag and release in composer
See [RELEASING.md](RELEASING.md).

## License

Expand Down
14 changes: 12 additions & 2 deletions RELEASING.md
Original file line number Diff line number Diff line change
@@ -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
Loading