136 lines
4.5 KiB
Plaintext
136 lines
4.5 KiB
Plaintext
# Release checklist
|
|
|
|
Check the version in the cabal file - update it if it hasn't already been updated. git grep for any other mentions of the version number that need updating.
|
|
|
|
Update the changelog, use git diff or similar to try to reduce the chance of missing anything important.
|
|
|
|
Run the tests (if any fail at the point of thinking about a release, then something has gone horribly wrong ...)
|
|
|
|
~~~~
|
|
cabal test
|
|
~~~~
|
|
|
|
Do the cabal checks:
|
|
|
|
~~~~
|
|
cabal update
|
|
cabal outdated
|
|
cabal check
|
|
~~~~
|
|
|
|
Check everything:
|
|
|
|
~~~~
|
|
make clean
|
|
make really-all
|
|
~~~~
|
|
|
|
TODO: you need silverbane to check the examples in the index.md.
|
|
|
|
Then:
|
|
|
|
* check the webpages appear nicely
|
|
|
|
* check all the tests are rendered on the example page -> need to find a robust way of doing this, because there are huge numbers and it's impossible to eyeball and tell if it's good unless you somehow spot a problem.
|
|
|
|
Update stack.yaml to the latest lts - check this page: https://www.stackage.org/ . While updating, check the extra-deps field, if there are any there, see if they can be removed.
|
|
|
|
Install latest stack and check it works - maybe the stack.yaml file needs a tweak, maybe the cabal file.
|
|
|
|
~~~~
|
|
ghcup list
|
|
ghcup install stack [latest from the list on stackage.org]
|
|
stack test
|
|
~~~~
|
|
|
|
Run the tests on the previous 2 ghcs latest point releases, and the latest ghc, each with the latest cabal-install they support (e.g. as of October 2024, these three ghc versions are 9.10.1, 9.8.2, 9.6.6). This is now trivial to do with ghcup, amazing progress in Haskell tools in recent years.
|
|
|
|
Build the release tarball, run a test with an example using this tarball:
|
|
|
|
~~~~
|
|
cabal sdist
|
|
mkdir temp-build
|
|
# get the path to the tar.gz from the output of cabal sdist
|
|
cp simple-sql-parser/main/dist-newstyle/sdist/simple-sql-parser-0.X.X.tar.gz temp-build
|
|
cd temp-build
|
|
cabal init -n
|
|
cp ../examples/SimpleSQLParserTool.hs app/Main.hs
|
|
~~~~
|
|
|
|
Add these to the build-depends: for the Main in temp-build.cabal:
|
|
|
|
~~~~
|
|
simple-sql-parser == 0.X.X,
|
|
pretty-show,
|
|
text
|
|
~~~~
|
|
|
|
Add a cabal.project.local file containing:
|
|
|
|
~~~~
|
|
packages:
|
|
./
|
|
./simple-sql-parser-0.X.X.tar.gz
|
|
~~~~
|
|
|
|
Run the test:
|
|
|
|
~~~~
|
|
cabal run temp-build -- parse -c "select 1"
|
|
~~~~
|
|
|
|
Example of output on success:
|
|
|
|
~~~~
|
|
$ cabal run temp-build -- parse -c "select 1"
|
|
Build profile: -w ghc-9.8.1 -O1
|
|
In order, the following will be built (use -v for more details):
|
|
- simple-sql-parser-0.7.0 (lib) (requires build)
|
|
- temp-build-0.1.0.0 (exe:temp-build) (first run)
|
|
Starting simple-sql-parser-0.7.0 (lib)
|
|
Building simple-sql-parser-0.7.0 (lib)
|
|
Installing simple-sql-parser-0.7.0 (lib)
|
|
Completed simple-sql-parser-0.7.0 (lib)
|
|
Configuring executable 'temp-build' for temp-build-0.1.0.0..
|
|
Preprocessing executable 'temp-build' for temp-build-0.1.0.0..
|
|
Building executable 'temp-build' for temp-build-0.1.0.0..
|
|
[1 of 1] Compiling Main ( app/Main.hs, /home/jake/wd/simple-sql-parser/main/temp-build/dist-newstyle/build/x86_64-linux/ghc-9.8.1/temp-build-0.1.0.0/x/temp-build/build/temp-build/temp-build-tmp/Main.o )
|
|
[2 of 2] Linking /home/jake/wd/simple-sql-parser/main/temp-build/dist-newstyle/build/x86_64-linux/ghc-9.8.1/temp-build-0.1.0.0/x/temp-build/build/temp-build/temp-build
|
|
[ SelectStatement
|
|
Select
|
|
{ qeSetQuantifier = SQDefault
|
|
, qeSelectList = [ ( NumLit "1" , Nothing ) ]
|
|
, qeFrom = []
|
|
, qeWhere = Nothing
|
|
, qeGroupBy = []
|
|
, qeHaving = Nothing
|
|
, qeOrderBy = []
|
|
, qeOffset = Nothing
|
|
, qeFetchFirst = Nothing
|
|
}
|
|
]
|
|
~~~~
|
|
|
|
TODO: hlint?, how to do a spell check, what about automatic code formatting?
|
|
|
|
If there are any non trivial changes to the website or api, upload a new website.
|
|
|
|
Upload candidate to hackage, run a test with example using this package
|
|
- don't remember how this works, but I think you'll do the same as testing the tarball locally, but don't copy the tarball or add a cabal.project file, after uploading the candidate I think you just need to do a 'cabal update', then the cabal build should find the candidate if you gave it the exact version.
|
|
|
|
If all good, release the candidate - a button on the hackage website.
|
|
|
|
Update the website
|
|
|
|
add a tag for the commit corresponding to the version:
|
|
|
|
~~~~
|
|
git tag -a v0.7.0 -m "0.7.0"
|
|
git push origin v0.7.0
|
|
~~~~
|
|
|
|
This will add the tag to the current commit.
|
|
|
|
|
|
Todo: try to turn as much of this into a script, with a nice report as possible, order this list properly, say what you need to check in more detail, say what else you need to redo if any steps need actions.
|