Update readme

This commit is contained in:
Christopher Vagnetoft
2026-01-09 17:17:55 +01:00
parent 222a7dfc07
commit 9660b1a896

View File

@@ -2,30 +2,54 @@
This is a composer plugin to create zipballs, and publish them to Gitea.
## Usage
## Install
Install globally using composer:
```bash
# Installation (per project)
$ composer require --dev noccylabs/composer-package
# (or global)
$ composer global require noccylabs/composer-package
$ composer global repo add noccylabs composer https://dev.noccylabs.info/api/packages/noccylabs/composer
$ composer global require noccylabs/composer-package-plugin
```
# Authenticate to remotes
## 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
# Create package from working directory
$ composer package --dirty
# Create and publish without saving zipball
# 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
# Publish latest zipball
$ composer package:publish gitea:myserver.tld:myowner
```
## Notes
#### Dirty builds
- All builds are dirty right now. Cloning logic is to be implemented.
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
```