Skip to content

Commit 20c5652

Browse files
committed
Better documenting release process.
1 parent ddd0362 commit 20c5652

File tree

2 files changed

+26
-1
lines changed

2 files changed

+26
-1
lines changed

Makefile

Lines changed: 17 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,8 @@ RUNTIME_DEPENDENCIES:=bash curl cut date diff grep mktemp openssl sed
1313
install \
1414
install-test-deps \
1515
lint \
16-
test
16+
test \
17+
release
1718

1819
all: \
1920
check-dependencies \
@@ -108,3 +109,18 @@ test:
108109
luarocks --tree=/tmp/resty-auto-ssl-server-luarocks make ./lua-resty-auto-ssl-git-1.rockspec
109110
luarocks --tree=/tmp/resty-auto-ssl-server-luarocks install dkjson 2.5-2
110111
busted ./spec
112+
113+
release:
114+
# Ensure the rockspec has been renamed and updated.
115+
grep -q -F 'version = "${VERSION}-1"' "lua-resty-auto-ssl-${VERSION}-1.rockspec"
116+
grep -q -F 'tag = "v${VERSION}"' "lua-resty-auto-ssl-${VERSION}-1.rockspec"
117+
# Ensure the CHANGELOG has been updated.
118+
grep -q -F '## ${VERSION} -' CHANGELOG.md
119+
# Make sure tests pass.
120+
docker-compose run --rm -v "${PWD}:/app" app make test
121+
# Check for remote tag.
122+
git ls-remote -t | grep -F "refs/tags/v${VERSION}^{}"
123+
# Verify LuaRock can be built locally.
124+
docker-compose run --rm -v "${PWD}:/app" app luarocks pack "lua-resty-auto-ssl-${VERSION}-1.rockspec"
125+
# Upload to LuaRocks
126+
docker-compose run --rm -v "${HOME}/.luarocks/upload_config.lua:/root/.luarocks/upload_config.lua" -v "${PWD}:/app" app luarocks upload "lua-resty-auto-ssl-${VERSION}-1.rockspec"

README.md

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -370,6 +370,15 @@ $ docker-compose run --rm app make test
370370

371371
The test suite is implemented using nginx' [`Test::Nginx`](https://metacpan.org/pod/Test::Nginx::Socket) cpan module.
372372

373+
### Release Process
374+
375+
To release a new version to LuaRocks:
376+
377+
- Ensure `CHANGELOG.md` is up to date.
378+
- Move the rockspec file to the new version number (`git mv lua-resty-auto-ssl-X.X.X-1.rockspec lua-resty-auto-ssl-X.X.X-1.rockspec`), and update the `version` and `tag` variables in the rockspec file.
379+
- Commit and tag the release (`git tag -a vX.X.X -m "Tagging vX.X.X" && git push origin vX.X.X`).
380+
- Run `make release VERSION=X.X.X`.
381+
373382
## Credits
374383

375384
**[dehydrated](https://github.com/lukas2511/dehydrated)** is the client used internally that does all the heavy lifting with Let's Encrypt.

0 commit comments

Comments
 (0)