go build -o rx-cleanup
LOG_LEVEL=DEBUG ./rx-cleanup --help
We are making releases available as GitHub releases using go-releaser. The release process is controlled by the .goreleaser.yml
file.
To make a release:
- Set the version number in the constant
version
in the filecmd/version.go
- Ensure there is no
dist
folder in the project (left from previous release) - Get the Personal Access Token (PAT) - with access to repository and
write:packages
scope, and with enabled SSO for organisation (or create it) - Login to the docker repository with your PAT
echo $CR_PAT | docker login ghcr.io -u magnus-longva-bouvet --password-stdin
- Run the command to create a version with a tag, build a docker image and push them to GitHub repository. Recommended to set <number_of_cores> to a number well below your CPU count if you want to get any work done while compiling.
git tag -a v<version_numnber> -m "<release_note>" git push origin v<version_number> goreleaser release --rm-dist --parallelism <number_of_cores>
- If something goes wrong:
- open the GitHub repository and delete created tag (with release)
- delete it locally
git tag -d v0.0.1
- reset changes
git reset --hard
- delete the
dist
folder - perform the previous step
make release ...
again
To generate a local version for debugging purposes, it can be built using:
CGO_ENABLED=0 GOOS=darwin go build -ldflags "-s -w" -a -installsuffix cgo -o ./rx-cleanup
Want to contribute? Read our contributing guidelines