;tools:just: release script updates
This commit is contained in:
parent
b26c274080
commit
8c5bcbb7d3
164
Justfile
164
Justfile
@ -958,6 +958,8 @@ bin-short:
|
|||||||
# ** Releasing ------------------------------------------------------------
|
# ** Releasing ------------------------------------------------------------
|
||||||
RELEASING:
|
RELEASING:
|
||||||
|
|
||||||
|
# These are roughly in the order they should be done during release.
|
||||||
|
|
||||||
# Create or switch to this release branch, and set the version string in various places.
|
# Create or switch to this release branch, and set the version string in various places.
|
||||||
relbranch VER:
|
relbranch VER:
|
||||||
#!/usr/bin/env bash
|
#!/usr/bin/env bash
|
||||||
@ -988,7 +990,11 @@ relbranch VER:
|
|||||||
just _on-release-branch
|
just _on-release-branch
|
||||||
tools/relnotes.hs
|
tools/relnotes.hs
|
||||||
|
|
||||||
# Make git tags for a full release today, but don't push them. Run on release branch.
|
# Upload all packages to hackage (run from release branch).
|
||||||
|
@hackageupload:
|
||||||
|
tools/hackageupload $PACKAGES
|
||||||
|
|
||||||
|
# Make git tags for a full release today, but don't push them yet. Run on release branch.
|
||||||
reltags:
|
reltags:
|
||||||
#!/usr/bin/env bash
|
#!/usr/bin/env bash
|
||||||
set -euo pipefail
|
set -euo pipefail
|
||||||
@ -999,27 +1005,24 @@ reltags:
|
|||||||
git tag --force --sign `cat .version` -m "Release `cat .version`"
|
git tag --force --sign `cat .version` -m "Release `cat .version`"
|
||||||
echo "Release has been tagged!"
|
echo "Release has been tagged!"
|
||||||
|
|
||||||
# Push the current branch to github binaries branch, generating release binaries.
|
# Push the current HEAD to github binaries branch, generating platform binaries.
|
||||||
@relbin:
|
@ghbin:
|
||||||
# assumes the github remote is named "origin"
|
# assumes the github remote is named "origin"
|
||||||
git push -f origin HEAD:binaries
|
git push -f origin HEAD:binaries
|
||||||
|
|
||||||
# Get the id of the latest run of the named workflow.
|
# Browse the latest run of the platform binaries workflows.
|
||||||
@_ghrun-id WORKFLOW:
|
@ghbin-open:
|
||||||
gh run list --workflow {{ WORKFLOW }} --json databaseId --jq '.[0].databaseId'
|
just ghrun-open binaries-linux-x64
|
||||||
|
just ghrun-open binaries-mac-arm64
|
||||||
|
just ghrun-open binaries-mac-x64
|
||||||
|
just ghrun-open binaries-windows-x64
|
||||||
|
|
||||||
# Browse the latest run of the named workflow.
|
# XXX
|
||||||
@ghrun WORKFLOW:
|
# Release binaries are downloaded to local machine, repacked, and uploaded to GH release.
|
||||||
gh run view --web $(just _ghrun-id {{ WORKFLOW }})
|
# Nightly binaries are copied from their last runs by a workflow on GH.
|
||||||
|
# Why the difference, is special repacking needed, for release only ?
|
||||||
|
|
||||||
# Browse the latest run of the main binary workflows.
|
# Download new binaries from the latest runs of the platform binaries workflows, and recompress them.
|
||||||
@ghbin:
|
|
||||||
just ghrun binaries-linux-x64
|
|
||||||
just ghrun binaries-mac-arm64
|
|
||||||
just ghrun binaries-mac-x64
|
|
||||||
just ghrun binaries-windows-x64
|
|
||||||
|
|
||||||
# Download any new binaries from the latest runs of the main binary github workflows, and recompress them.
|
|
||||||
ghbin-download:
|
ghbin-download:
|
||||||
mkdir -p tmp
|
mkdir -p tmp
|
||||||
cd tmp; rm -rf hledger-*64
|
cd tmp; rm -rf hledger-*64
|
||||||
@ -1032,16 +1035,16 @@ ghbin-download:
|
|||||||
cd tmp; rm -rf hledger-*64
|
cd tmp; rm -rf hledger-*64
|
||||||
|
|
||||||
# Browse the latest github release.
|
# Browse the latest github release.
|
||||||
@ghrel:
|
@ghrel-open:
|
||||||
gh release view -w
|
gh release view -w
|
||||||
|
|
||||||
# Upload release notes to the configured github release. (Might also create/publish the release ?)
|
# Upload release notes to the configured github release.
|
||||||
@ghrel-notes:
|
@ghrel-notes:
|
||||||
just _on-release-branch
|
just _on-release-branch
|
||||||
doc/ghrelnotes `cat .version` | gh release edit `cat .version` -F-
|
doc/ghrelnotes `cat .version` | gh release edit `cat .version` -F-
|
||||||
|
|
||||||
# Upload the downloaded binaries to the specified github release. Run after ghbin-download.
|
# After ghbin-download: upload the downloaded binaries to the specified github release.
|
||||||
ghrel-bin VER:
|
ghrel-bin-upload VER:
|
||||||
@read -p "Warning! uploading binaries to release {{ VER }}, are you sure ? Enter to proceed: "
|
@read -p "Warning! uploading binaries to release {{ VER }}, are you sure ? Enter to proceed: "
|
||||||
gh release upload --clobber {{ VER }} tmp/hledger-linux-x64.tar.gz
|
gh release upload --clobber {{ VER }} tmp/hledger-linux-x64.tar.gz
|
||||||
gh release upload --clobber {{ VER }} tmp/hledger-mac-arm64.tar.gz
|
gh release upload --clobber {{ VER }} tmp/hledger-mac-arm64.tar.gz
|
||||||
@ -1052,43 +1055,12 @@ ghrel-bin VER:
|
|||||||
# gh release upload {{ VER }} tmp/hledger-mac-x64/hledger-mac-x64.tar.gz
|
# gh release upload {{ VER }} tmp/hledger-mac-x64/hledger-mac-x64.tar.gz
|
||||||
# gh release upload {{ VER }} tmp/hledger-windows-x64/hledger-windows-x64.tar.gz
|
# gh release upload {{ VER }} tmp/hledger-windows-x64/hledger-windows-x64.tar.gz
|
||||||
|
|
||||||
# Upload all packages to hackage (run from release branch).
|
|
||||||
@hackageupload:
|
|
||||||
tools/hackageupload $PACKAGES
|
|
||||||
|
|
||||||
# Push the 5 release tags for the specified release version.
|
# Push the 5 release tags for the specified release version.
|
||||||
reltags-push VER:
|
reltags-push VER:
|
||||||
git push origin {{ VER }} hledger-{{ VER }} hledger-lib-{{ VER }} hledger-ui-{{ VER }} hledger-web-{{ VER }}
|
git push origin {{ VER }} hledger-{{ VER }} hledger-lib-{{ VER }} hledger-ui-{{ VER }} hledger-web-{{ VER }}
|
||||||
|
|
||||||
# Push master to github, move the nightly tag there, and start building new nightly binaries.
|
# After major release: in master, tag the start of a new dev cycle ("OLDVER.99") and push the tag. And update the versions/help/manuals there.
|
||||||
nightly-push:
|
devtag-push:
|
||||||
#!/usr/bin/env bash
|
|
||||||
set -euo pipefail
|
|
||||||
just push
|
|
||||||
git tag -f nightly master
|
|
||||||
git push -f origin nightly
|
|
||||||
git push -f origin master:binaries
|
|
||||||
echo "Now wait; when nightly binaries have built successfully, run just nightly-bin"
|
|
||||||
|
|
||||||
# Copy the latest-built nightly binaries to the Nightly prerelease. Wait for nightly-push's builds to complete first.
|
|
||||||
@nightly-bin:
|
|
||||||
gh workflow run nightly
|
|
||||||
|
|
||||||
# Push the prerelease notes to the github nightly prerelease.
|
|
||||||
@nightly-notes:
|
|
||||||
gh release edit nightly -F doc/nightlynotes.md
|
|
||||||
|
|
||||||
# Browse the github nightly prerelease.
|
|
||||||
@nightly-open:
|
|
||||||
gh release view -w nightly
|
|
||||||
|
|
||||||
# Point the nightly tag at the latest release, locally and on github. Run after a release.
|
|
||||||
@nightly-tag:
|
|
||||||
git tag -f nightly $(just relver)
|
|
||||||
git push -f origin nightly
|
|
||||||
|
|
||||||
# Tag the start of a new dev cycle ("OLDVER.99"), locally and on github. Also update the dev versions/help/manuals. Run on master after a major release.
|
|
||||||
devtag:
|
|
||||||
#!/usr/bin/env bash
|
#!/usr/bin/env bash
|
||||||
set -euo pipefail
|
set -euo pipefail
|
||||||
RELVER=$(just relver)
|
RELVER=$(just relver)
|
||||||
@ -1106,6 +1078,36 @@ devtag:
|
|||||||
./Shake manuals -c
|
./Shake manuals -c
|
||||||
echo "Consider also: with $RELVER installed, ./Shake cmddocs -c"
|
echo "Consider also: with $RELVER installed, ./Shake cmddocs -c"
|
||||||
|
|
||||||
|
# XXX There's a tag and a github prerelease, both named nightly, creating confusion.
|
||||||
|
|
||||||
|
# After release: point the nightly tag at the release and push the tag.
|
||||||
|
@nightlytag-push:
|
||||||
|
git tag -f nightly $(just relver)
|
||||||
|
git push -f origin nightly
|
||||||
|
|
||||||
|
# XXX Ideally we'd like to adjust and push the nightly tag only after a successful build and push of new binaries.
|
||||||
|
# Between releases: push master to github, then point the nightly tag there, push the tag, and start building new platform binaries. (Until builds succeed, the tag will be wrong.)
|
||||||
|
master-nightlyrel-push:
|
||||||
|
#!/usr/bin/env bash
|
||||||
|
set -euo pipefail
|
||||||
|
just push
|
||||||
|
git tag -f nightly master
|
||||||
|
git push -f origin nightly
|
||||||
|
git push -f origin master:binaries
|
||||||
|
echo "When binaries have built successfully, run just nightlyrel-bin-copy"
|
||||||
|
|
||||||
|
# Browse the github nightly prerelease.
|
||||||
|
@nightlyrel-open:
|
||||||
|
gh release view -w nightly
|
||||||
|
|
||||||
|
# Push the nightly prerelease notes to the github nightly prerelease.
|
||||||
|
@nightlyrel-notes:
|
||||||
|
gh release edit nightly -F doc/nightlynotes.md
|
||||||
|
|
||||||
|
# After building platform binaries (ghbin), copy them to the github nightly prerelease.
|
||||||
|
@nightlyrel-bin-copy:
|
||||||
|
gh workflow run nightly
|
||||||
|
|
||||||
# ** Installing ------------------------------------------------------------
|
# ** Installing ------------------------------------------------------------
|
||||||
INSTALLING:
|
INSTALLING:
|
||||||
|
|
||||||
@ -1646,29 +1648,6 @@ bloglog:
|
|||||||
# ** Misc ------------------------------------------------------------
|
# ** Misc ------------------------------------------------------------
|
||||||
MISC:
|
MISC:
|
||||||
|
|
||||||
# run tests locally, push master to github ci, wait for tests to pass there, refreshing every INTERVAL (default:10s), then push to github master.
|
|
||||||
@push *INTERVAL:
|
|
||||||
just functest --hide && tools/push {{ INTERVAL }}
|
|
||||||
|
|
||||||
# run some tests to validate the development environment
|
|
||||||
# check-setup:
|
|
||||||
# run some tests to validate the development environment\
|
|
||||||
# )
|
|
||||||
# @echo sanity-checking developer environment:
|
|
||||||
# @({{ SHELLTEST }} checks \
|
|
||||||
# && echo $@ PASSED) || echo $@ FAILED
|
|
||||||
|
|
||||||
# sym-link some directories required by hledger-web dev builds
|
|
||||||
symlink-web-dirs:
|
|
||||||
echo "#ln -sf hledger-web/config # disabled, causes makeinfo warnings"
|
|
||||||
ln -sf hledger-web/messages
|
|
||||||
ln -sf hledger-web/static
|
|
||||||
ln -sf hledger-web/templates
|
|
||||||
|
|
||||||
# symlink tools/commitlint as .git/hooks/commit-msg
|
|
||||||
installcommithook:
|
|
||||||
ln -s ../../tools/commitlint .git/hooks/commit-msg
|
|
||||||
|
|
||||||
# ensure the Shake script is compiled
|
# ensure the Shake script is compiled
|
||||||
Shake: # Shake.hs
|
Shake: # Shake.hs
|
||||||
./Shake.hs
|
./Shake.hs
|
||||||
@ -1693,6 +1672,37 @@ TAGFILES := WEBTEMPLATEFILES + DOCSOURCEFILES + TESTFILES + HPACKFILES + CABALFI
|
|||||||
@etags-clean:
|
@etags-clean:
|
||||||
rm -f TAGS
|
rm -f TAGS
|
||||||
|
|
||||||
|
# run some tests to validate the development environment
|
||||||
|
# check-setup:
|
||||||
|
# run some tests to validate the development environment\
|
||||||
|
# )
|
||||||
|
# @echo sanity-checking developer environment:
|
||||||
|
# @({{ SHELLTEST }} checks \
|
||||||
|
# && echo $@ PASSED) || echo $@ FAILED
|
||||||
|
|
||||||
|
# sym-link some directories required by hledger-web dev builds
|
||||||
|
symlink-web-dirs:
|
||||||
|
echo "#ln -sf hledger-web/config # disabled, causes makeinfo warnings"
|
||||||
|
ln -sf hledger-web/messages
|
||||||
|
ln -sf hledger-web/static
|
||||||
|
ln -sf hledger-web/templates
|
||||||
|
|
||||||
|
# symlink tools/commitlint as .git/hooks/commit-msg
|
||||||
|
installcommithook:
|
||||||
|
ln -s ../../tools/commitlint .git/hooks/commit-msg
|
||||||
|
|
||||||
|
# run tests locally, push master to github ci, wait for tests to pass there, refreshing every INTERVAL (default:10s), then push to github master.
|
||||||
|
@push *INTERVAL:
|
||||||
|
just functest --hide && tools/push {{ INTERVAL }}
|
||||||
|
|
||||||
|
# Get the id of the latest run of the named workflow.
|
||||||
|
@_ghrun-id WORKFLOW:
|
||||||
|
gh run list --workflow {{ WORKFLOW }} --json databaseId --jq '.[0].databaseId'
|
||||||
|
|
||||||
|
# Browse the latest run of the named workflow.
|
||||||
|
@ghrun-open WORKFLOW:
|
||||||
|
gh run view --web $(just _ghrun-id {{ WORKFLOW }})
|
||||||
|
|
||||||
# stackclean: \
|
# stackclean: \
|
||||||
# $(call def-help-hide,stackclean, remove .stack-work/ dirs )
|
# $(call def-help-hide,stackclean, remove .stack-work/ dirs )
|
||||||
# $(STACK) purge
|
# $(STACK) purge
|
||||||
|
|||||||
@ -74,7 +74,7 @@ It should be improved each time it is used.
|
|||||||
- desired improvements landed and stabilised
|
- desired improvements landed and stabilised
|
||||||
- building and passing tests with current ghcs, deps, and stackage snapshots
|
- building and passing tests with current ghcs, deps, and stackage snapshots
|
||||||
- building and passing tests on all platforms / with all ghc versions
|
- building and passing tests on all platforms / with all ghc versions
|
||||||
`just relbin` (or push to github `binaries[-*]` branch)
|
`just ghbin` (or push to github `binaries[-*]` branch)
|
||||||
`just oldest` (or push to github `oldest` branch)
|
`just oldest` (or push to github `oldest` branch)
|
||||||
|
|
||||||
- **2. product docs and metadata**
|
- **2. product docs and metadata**
|
||||||
@ -109,7 +109,7 @@ It should be improved each time it is used.
|
|||||||
|
|
||||||
- **3. release docs and artifacts**
|
- **3. release docs and artifacts**
|
||||||
- draft binaries building started
|
- draft binaries building started
|
||||||
`just relbin`
|
`just ghbin`
|
||||||
- hledger.org html manuals x 3 (site/src/MAJORVER/\*.md) (major release only)
|
- hledger.org html manuals x 3 (site/src/MAJORVER/\*.md) (major release only)
|
||||||
`just site-manuals-snapshot MAJORVER` to create/update
|
`just site-manuals-snapshot MAJORVER` to create/update
|
||||||
update `site/Makefile`, `site/js/site.js`, `site/hledger.org.caddy`
|
update `site/Makefile`, `site/js/site.js`, `site/hledger.org.caddy`
|
||||||
@ -125,7 +125,7 @@ It should be improved each time it is used.
|
|||||||
- release tags
|
- release tags
|
||||||
`just reltags`
|
`just reltags`
|
||||||
- release binaries built from tag
|
- release binaries built from tag
|
||||||
`just relbin`,
|
`just ghbin`,
|
||||||
wait for all to succeed
|
wait for all to succeed
|
||||||
- Install page (site/src/install.md) --version examples match release binaries
|
- Install page (site/src/install.md) --version examples match release binaries
|
||||||
|
|
||||||
@ -153,15 +153,15 @@ It should be improved each time it is used.
|
|||||||
- github draft release with release binaries attached
|
- github draft release with release binaries attached
|
||||||
<https://github.com/simonmichael/hledger/releases/new> *(XXX safari may not show new tag, may need brave)*
|
<https://github.com/simonmichael/hledger/releases/new> *(XXX safari may not show new tag, may need brave)*
|
||||||
`just ghrel-notes` (in release branch)
|
`just ghrel-notes` (in release branch)
|
||||||
`just ghruns-download` <!-- (or if throttled: `just ghbin`, download to tmp/, unzip the unix ones) -->
|
`just ghbin-download` <!-- (or if throttled: `just ghbin-open`, download to tmp/, unzip the unix ones) -->
|
||||||
`just ghrel-upload VER`
|
`just ghrel-bin-upload VER`
|
||||||
- github release published
|
- github release published
|
||||||
review,
|
review,
|
||||||
publish
|
publish
|
||||||
- github nightly release updated
|
- github nightly release updated
|
||||||
in master, update changes link in doc/ghnightlynotes.md
|
in master, update changes link in doc/ghnightlynotes.md
|
||||||
`just ghnightly-notes`
|
`just nightlyrel-notes`
|
||||||
`just nightly-tag`
|
`just nightlytag-push`
|
||||||
- install instructions tested and working
|
- install instructions tested and working
|
||||||
- stack
|
- stack
|
||||||
- cabal
|
- cabal
|
||||||
@ -177,7 +177,7 @@ It should be improved each time it is used.
|
|||||||
- **5. cleanup and support**
|
- **5. cleanup and support**
|
||||||
- review/polish/sync changelogs & relnotes
|
- review/polish/sync changelogs & relnotes
|
||||||
- new version, man dates, dev tag in master (major version only)
|
- new version, man dates, dev tag in master (major version only)
|
||||||
`j devtag`
|
`j devtag-push`
|
||||||
- RELEASING.md checklist/notes updated
|
- RELEASING.md checklist/notes updated
|
||||||
- monitor/support/handle issues:
|
- monitor/support/handle issues:
|
||||||
[issue tracker](https://github.com/simonmichael/hledger/issues?q=is%3Aopen+is%3Aissue), matrix, irc, mail list, forum, reddit
|
[issue tracker](https://github.com/simonmichael/hledger/issues?q=is%3Aopen+is%3Aissue), matrix, irc, mail list, forum, reddit
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user