crudadmin/release is the command line tool crudadmin-release. It publishes a version of a package to packages.crudadmin.com when you push its git tag.
Installation
Install the tool once per computer, e.g. as a link in yourPATH:
git push. It replaces older release hooks of the package, and refuses to overwrite a hook it did not create.
Releasing a version
x.y.z format is released before it reaches the remote, v1.2.0 and pre-release suffixes like 1.2.0-beta.1 work too. A failed release stops the push. Pushes of branches pass through.
- The package name is read from
composer.jsonof the tag. - The optional build command runs.
- The package is archived with
git archive, without theexport-ignorepaths of.gitattributes. - The zip is uploaded with the date of the tagged commit. The date decides which licenses may install the version.
Commands
Token
The tool reads the release token from, in this order:- the
CRUDADMIN_RELEASE_TOKENenvironment variable - the macOS Keychain, service
crudadmin-release-token - the file
~/.config/crudadmin/release-token, readable only by you
packages.crudadmin.com, and the token must be allowed to release it.
Built assets
Packages with a frontend build configure it incomposer.json. The build runs on the tagged commit with a clean working tree, and the built files are added to the zip:
composer.json
forbid lists extensions which must not be in the zip, map by default. Source maps are never included.
Exclude development files from the zip in .gitattributes:
.gitattributes