forked from dafny-lang/dafny
-
Notifications
You must be signed in to change notification settings - Fork 0
/
RELEASE.txt
119 lines (90 loc) · 4.69 KB
/
RELEASE.txt
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
This is the procedure for generating a new Dafny release.
0) Write release notes about changes since the last release.
1) In an up-to-date repository, with the master branch checked out
and up-to-date (e.g., git pull upstream)
cd to the repo root (i.e., dafny, which contains Source, Binaries, etc.)
2) Select a version number (descriptor) $VER (e.g., "3.0.0" or "3.0.0-alpha")
and select an internal version number (e.g., "3.0.0.30203")
Edit the internal version number in Source/version.cs.
Push/merge that change to the master branch.
3) Run 'Scripts/package.py "$VER"' (in a Linux or Mac system)
Warnings about missing fonts can be ignored.
Note: This step requires that you have installed pandoc, see the
https://github.com/dafny-lang/dafny/wiki/INSTALL#building-the-reference-manual.
4) Run 'Scripts/publish-release.sh $VER' to create the github release
and upload files to it. You will need to have a Github Personal
Authorization token stored in ~/github.token.
Also, this step requires the "jq" utility, which you can install
by "brew install jq" on a Mac (see https://stedolan.github.io/jq/download/).
Note: Each upload of this step can take a couple of minutes, so
be patient.
5) In the Github releases, edit the new release to add in the release notes.
6) Push the Publish button.
7) Edit the release name into .github/workflows/release-downloads.yml
for the 'ver' variable for Windows
Commit the modified files, such as
.github/workflows/release-downloads,yml, docs/DafnyRef/DafnyRef.pdf,
possibly docs/DafnyRef/Options.txt
'git push' the commit and create a PR. The creating of a
PR will cause the CI tests to be run, which includes
downloading the most recent release (this one, once it is Published)
and running some quick tests.
8) If something goes wrong, delete the release in github, fix the problem and try again
9) Update the brew formula for dafny (see below)
10) Announce the new release to the world.
--------------------------
brew is a package manager for the Mac.
The dafny project maintains a brew "formula" that allows easy installation
of dafny and its dependencies on a Mac. Note that brew does all
installations by building from source.
These are the instructions for updating the formula, which must be done
each time a new release is issued.
These instructions are meant to be executed on a Mac, in a Terminal shell.
All the homebrew formulas are held in a github repo, so some familiarity
with git commands and concepts is helpful.
0) Install brew if it is not already present on your machine:
'which brew' will tell you if it is
cf. https://docs.brew.sh/Installation
1) Update brew: brew update
2) Find the formula: cd $(brew --repo)/Library/Taps/homebrew/homebrew-core/Formula
3) Prep the repo:
a) git checkout master
b) git pull origin
c) git checkout -b <some new branch name>
The branch name is needed in various places below
4) Edit it, e.g.: vi dafny.rb
For a normal release change, all that is needed is to change the name
of the release and its sha and the revision number.
a) Change the line near the top of the file that is like
url "https://github.com/dafny-lang/dafny/archive/v2.3.0.tar.gz"
to hold the actual release number (this is the url for the source
asset; you can see the actual name on the Releases page for the
latest build)
b) Save the file
c) Run "brew reinstall dafny"
d) The command will complain that the sha does not match. Copy the
correct sha, reopen the file and paste the new sha into the "sha"
line after the "url" line
e) Bump up the revision number (by one) on the succeeding line.
f) Save the file
g) Check that you have not introduced any syntax errors by running
"brew reinstall dafny" again. If you totally mess up the file,
you can do 'git checkout dafny.rb'
5) Submit the change:
a) git add dafny.rb, presuming you are still in the directory from step 2
b) git commit -m "dafny: <some suitable comment>"
c) git push https://github.com/<your github username>/homebrew-core/ <the branch name>
you may be asked to do an 'unshallow' clone -- if so, just execute
the given command
6) Expect comments from the brew reviewers. In which case, do 4-6 again.
Eventually the reviewers will accept and merge the PR
7) Then do
git checkout master
git pull origin master
8) Test the installation by running
brew reinstall dafny
and then execute dafny on a sample file to see if it has the correct
version number. Even better is to try this step on a different machine
than the one on which the dafny.rb file was edited
9) If everything works you can, at your leisure do
git branch -d <the branch name>