Update readme
This commit is contained in:
52
README.md
52
README.md
@@ -2,30 +2,54 @@
|
|||||||
|
|
||||||
This is a composer plugin to create zipballs, and publish them to Gitea.
|
This is a composer plugin to create zipballs, and publish them to Gitea.
|
||||||
|
|
||||||
## Usage
|
## Install
|
||||||
|
|
||||||
|
Install globally using composer:
|
||||||
|
|
||||||
```bash
|
```bash
|
||||||
# Installation (per project)
|
$ composer global repo add noccylabs composer https://dev.noccylabs.info/api/packages/noccylabs/composer
|
||||||
$ composer require --dev noccylabs/composer-package
|
$ composer global require noccylabs/composer-package-plugin
|
||||||
# (or global)
|
```
|
||||||
$ composer global require noccylabs/composer-package
|
|
||||||
|
|
||||||
# Authenticate to remotes
|
## Usage
|
||||||
|
|
||||||
|
### Logging in to registry
|
||||||
|
|
||||||
|
```bash
|
||||||
$ composer package:login myserver.tld
|
$ 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
|
# Create package by cloning into temporary directory
|
||||||
$ composer package
|
$ composer package
|
||||||
# Create package from working directory
|
# Build zipball even if it exists
|
||||||
$ composer package --dirty
|
$ composer package --force
|
||||||
# Create and publish without saving zipball
|
# Create and publish, and delete zipball afterwards
|
||||||
$ composer package --rm --publish gitea:myserver.tld
|
$ composer package --rm --publish gitea:myserver.tld
|
||||||
# Create and publish to another owner
|
# Create and publish to another owner
|
||||||
$ composer package --publish gitea:myserver.tld:myowner
|
$ 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
|
||||||
|
```
|
||||||
|
|||||||
Reference in New Issue
Block a user