forked from JakeWheat/simple-sql-parser
-
Notifications
You must be signed in to change notification settings - Fork 0
/
release_checklist
133 lines (98 loc) · 4.44 KB
/
release_checklist
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
# 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 the start of 2024, these three ghc versions are 9.8.1, 9.6.4, 9.4.8). 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.
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.