diff --git a/Makefile b/Makefile index c35ddec..a3dc7b3 100644 --- a/Makefile +++ b/Makefile @@ -32,7 +32,10 @@ check-git-branch: then echo "ERR: Need to be on the \"${GIT_BRANCH}\" branch" >>/dev/stderr; \ exit 1; fi +pull-git-branch: + git pull + next-version-tag: git tag ${NEXT_VERSION} && git push --tags -release: check-git-branch next-version-tag +release: check-git-branch pull-git-branch next-version-tag diff --git a/README.md b/README.md index 35d4304..2e994de 100644 --- a/README.md +++ b/README.md @@ -23,16 +23,16 @@ Core feature of this program is the ability to change working directory while st This **can not** be done by the program itself, because of `POSIX` security limitations. Without instrumenting the shell with aliases `travelgrunt` will not work! -## How to install? +## How to install? :neckbeard: -### Install with homebrew +### Install with `homebrew`: ``` brew tap ivanilves/tap brew install ivanilves/tap/travelgrunt ``` -### Install latest binary with cURL +### Install latest binary with `cURL` + `sh`: Install latest release binary into `/usr/local/bin` (default): ``` @@ -47,10 +47,19 @@ curl -s -f \ | PREFIX=/somewhere/else sh ``` -## How to build? +## How to build? :construction: * `make dep` - install/ensure dependencies; * `make build` - build the `travelgrunt` binary in `cmd/travelgrunt` path; * `make install` - [optional] install built `travelgrunt` binary under the `${PREFIX}/bin` location; -[How to release a new version?](RELEASE.md) :package: +## How to release a new version? :package: + +:bulb: Make sure you have push permissions for this repository! + +Run `make release` recipe, which will: +* check, if you are on a `main` branch; +* pull the latest `main` branch from remote; +* calculate the next release version (update `MAJOR`.`MINOR` [here](https://github.com/ivanilves/travelgrunt/blob/main/Makefile#L2) if needed); +* tag the branch tip with the version calculated and push tag to remote then; +* [GoReleaser](https://github.com/ivanilves/travelgrunt/blob/main/.goreleaser.yml) will take care of everything else :sunglasses: diff --git a/RELEASE.md b/RELEASE.md deleted file mode 100644 index c411cf0..0000000 --- a/RELEASE.md +++ /dev/null @@ -1,16 +0,0 @@ -# How to release a new version? :package: - -:bulb: Export `GITHUB_TOKEN` environment variable. You may use git-ignored `secrets.mk` for this purpose: -``` -echo "export GITHUB_TOKEN := ghp_" > secrets.mk -``` - -Run `make full-release` recipe, which is equal to run following recipes, one by one: - -* `make github-token` - check if `GITHUB_TOKEN` variable is set; -* `make clean` - cleanup project tree from previously built artifacts; -* `make dep` - ensure all dependencies are installed; -* `make release` - create release artifacts; -* `make next-version-tag` - tag your HEAD with the incremented version; -* `make push-tags` - push your new tag to Git; -* `make github` - create a GitHub release using your artifacts;