Skip to content

Commit af0d484

Browse files
Final releaser (#21)
* Add make release * Add releasing docs
1 parent 5803a1b commit af0d484

File tree

3 files changed

+22
-6
lines changed

3 files changed

+22
-6
lines changed

.travis.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,7 @@ script:
1414
deploy:
1515
- provider: script
1616
skip_cleanup: true
17-
script: make release
17+
script: make deploy
1818
on:
1919
repo: jacobtomlinson/krontab
2020
tags: true

Makefile

Lines changed: 8 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,8 @@ help:
1818
@echo ' make build Compile the project.'
1919
@echo ' make build-all Compile the project for all supported architectures with goreleaser.'
2020
@echo ' make test Run tests on a compiled project.'
21-
@echo ' make release Perform a release of the current tag with goreleaser.'
21+
@echo ' make deploy Perform a deployment of the current tag with goreleaser.'
22+
@echo ' make release Create a git tag and push to GitHub.'
2223
@echo ' make clean Clean the directory tree.'
2324
@echo
2425

@@ -38,9 +39,14 @@ export KRONTAB_VERSION
3839
export GIT_COMMIT
3940
export GIT_DIRTY
4041
export BUILD_DATE
41-
release:
42+
deploy:
4243
curl -sL https://git.io/goreleaser | bash
4344

45+
release:
46+
@read -p "Enter tag [v{major}.{minor}.{patch}]: " tag; \
47+
echo Tagging $$tag \
48+
git checkout master && git pull origin master --tags && git tag -a $$tag -m "$$tag" && git push origin $$tag
49+
4450
clean:
4551
@test ! -e bin/${BIN_NAME} || rm bin/${BIN_NAME}
4652

README.md

Lines changed: 13 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -45,7 +45,7 @@ Krontab is configured with environment variables.
4545

4646
## Usage
4747

48-
```
48+
```console
4949
$ krontab help
5050
Krontab is a crontab replacement for kubernetes.
5151

@@ -122,7 +122,7 @@ Krontab will automatically generate a crontab from your existing Kubernetes Cron
122122
them with `krontab -e` or `krontab edit crontab`. Adding new lines to your crontab will be mapped into new
123123
CrobJob resources. Editing lines will update them and deleteing lines will remove them.
124124

125-
```
125+
```console
126126
$ krontab -e
127127
# Welcome to krontab, a crontab like editor for Kubernetes cron jobs.
128128
#
@@ -173,4 +173,14 @@ $ ./bin/krontab
173173

174174
#### Testing
175175

176-
``make test``
176+
```console
177+
$ make test
178+
```
179+
180+
### Releasing
181+
182+
Decide the new release version. Check out the [current releases](https://github.com/jacobtomlinson/krontab/releases) and follow SemVer to work out what it will be. Then run `make release` which will ask for the tag in the form `v{major}.{minor}.{patch}`. This will create the tag and push it to GitHub, Travis CI will then build the binaries and push them to github along with some autogenerated release notes.
183+
184+
```console
185+
$ make release
186+
```

0 commit comments

Comments
 (0)