-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Automate the existing manual release process using GitHub Actions (#26)
- Loading branch information
Showing
12 changed files
with
106 additions
and
69 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,13 @@ | ||
# vim: set ft=bash ts=3 sw=3 expandtab: | ||
# Bump the version in the changelog, preparing for a new development cycle | ||
|
||
command_bumpchangelog() { | ||
mv Changelog Changelog.$$ | ||
echo "Version $(poetry version patch --short) unreleased" > Changelog | ||
echo "" >> Changelog | ||
echo $'\t* ' >> Changelog | ||
echo "" >> Changelog | ||
cat Changelog.$$ >> Changelog | ||
rm -f Changelog.$$ | ||
} | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,12 @@ | ||
# vim: set ft=bash sw=3 ts=3 expandtab: | ||
|
||
help_dch() { | ||
# No help - hidden utility feature, sort of equivalent to the Debian 'dch' command | ||
echo -n "" | ||
} | ||
|
||
task_dch() { | ||
run_command bumpchangelog | ||
vim "+3" "+startinsert!" Changelog | ||
} | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,26 +1,10 @@ | ||
# vim: set ft=bash sw=3 ts=3 expandtab: | ||
# runscript: customized=true | ||
|
||
help_release() { | ||
echo "- run release: Release a specific version and tag the code" | ||
echo "- run release: Tag and release the code, triggering GHA to publish artifacts" | ||
} | ||
|
||
task_release() { | ||
local version | ||
|
||
run_command tagrelease "$@" | ||
run_task build | ||
|
||
version=$(poetry version --short) | ||
echo "" | ||
echo "*** Version v$version has been released and committed" | ||
echo "" | ||
echo "Next, push: git push --follow-tags" | ||
echo "" | ||
echo "Then go to: https://github.com/pronovic/vplan/releases/tag/v$version" | ||
echo "" | ||
echo "Convert the tag to a release and attach build artifacts:" | ||
ls -l dist | ||
echo "" | ||
} | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,6 +1,6 @@ | ||
[tool.poetry] | ||
name = "vplan" | ||
version = "0.6.1" | ||
version = "0.0.0" # published version is managed using Git tags (see below) | ||
description = "Vacation plan manager service for SmartThings" | ||
authors = ["Kenneth J. Pronovici <[email protected]>"] | ||
license = "Apache-2.0" | ||
|
@@ -26,6 +26,14 @@ classifiers=[ | |
"Topic :: Home Automation", | ||
] | ||
|
||
# Published version is managed using Git tags | ||
# We get either the tag (like "0.24.1") or a snapshot-type version (like "0.24.1+3.e8319c4") | ||
# If the plugin is not installed, then the version is always "0.0.0", taken from above | ||
[tool.poetry-dynamic-versioning] | ||
enable = true | ||
pattern = '^[vV](?P<base>\d+\.\d+\.\d+)' # this extracts the version from our vX.Y.Z tag format | ||
format-jinja = "{% if distance == 0 and not dirty %}{{ base }}{% else %}{{ base }}+{{ distance }}.{{ commit }}{% endif %}" | ||
|
||
[tool.poetry.scripts] | ||
vplan = "vplan.client.cli:vplan" | ||
|
||
|
@@ -85,5 +93,5 @@ line_length = 132 | |
skip_glob = [ "docs", "notes" ] | ||
|
||
[build-system] | ||
requires = ["poetry-core>=1.0.0"] | ||
build-backend = "poetry.core.masonry.api" | ||
requires = ["poetry>=1.0.0", "poetry-dynamic-versioning"] | ||
build-backend = "poetry_dynamic_versioning.backend" |