# Composer Package Tools This is a composer plugin to create zipballs, and publish them to Gitea. ## Install Install globally using composer: ```bash $ composer global repo add noccylabs composer https://dev.noccylabs.info/api/packages/noccylabs/composer $ composer global require noccylabs/composer-package-plugin ``` ## Usage ### Logging in to registry ```bash $ composer package:login myserver.tld ``` ### Building packages Packages are built with the `package:build` command, or the more convenient alias `package`. ```bash # Create package by cloning into temporary directory $ composer package # Build zipball even if it exists $ composer package --force # Create and publish, and delete zipball afterwards $ composer package --rm --publish gitea:myserver.tld # Create and publish to another owner $ composer package --publish gitea:myserver.tld:myowner ``` #### Dirty builds Dirty builds are made directly from the source tree instead of from a clone of a specific tag. You should avoid these as far as possible, but if for some reason you need to build a package directly from your working copy while piggybacking on the git version, pass `--dirty` to the `package:build` command. ### Publishing packages If you like to manually publish a package (as opposed to passing `--publish` to the `package:build` command) you can use the `package:publish` command. ```bash # Publish latest zipball to another owner $ composer package:publish gitea:myserver.tld:myowner # Publish specific version $ composer package:publish gitea:myserver.tld 1.0.0 ```