forked from reflectometry/refl1d
-
Notifications
You must be signed in to change notification settings - Fork 0
/
release.sh
executable file
·100 lines (71 loc) · 2.55 KB
/
release.sh
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
#!/bin/sh
cat <<EOF
Refl1D Release Process
(0) release dependent packages (bumps, periodictable) if necessary
# for reproducible builds we want a fixed bumps version number, but for
# users who are living without virtualenv, we want to be relaxed about
# the version number. Maybe separate pip requirements from binary
# distribution requirements? Or maybe don't worry about it.
(1) check that all changes have been pushed
[bumps, refl1d, periodictable] X [windows, mac, linux boxen]
# Note: linux boxen includes ~/dev as well as ~/src on the shared machines
sh
git status
(2) check that all tests pass
[bumps, refl1d, periodictable] X [windows, mac, linux] X [python 2.6, 2.7, 3.3, 3.4]
git pull
pythonX.Y tests.py
pythonX.Y check_examples.py --chisq
(3) update change log in CHANGES.rst
(cd ../periodictable && git log)
(cd ../bumps && git log)
git log
(4) build the docs
# even though this should happen automatically in jenkins we
# do the builds by hand to make sure they are error free.
(cd doc && make clean html pdf)
(5) update version number and requirements
vi refl1d/__init__.py
vi setup.py
vi rtd-requirements
git commit -a -m "R X.Y.Z"
git push
(6) build the binaries for windows and mac
# again, release is on jenkins, but this allows us to check the build
# Note: don't use anaconda to build release version unless we update all
# web pages to say "built with anaconda"; as convenient as it is, we don't
# want to run afoul of license agreements by missing a page.
[windows, mac]
python master_builder.py
(7) tag release
git tag -a vX.Y.Z -m "Refl1d X.Y.Z"
git push --tags # OR MAYBE: git push origin vX.Y.Z
# to move a tag to the new head
git tag -a vX.Y.Z -f
git push --tags -f
# trigger the build on readthedocs
https://readthedocs.org/builds/refl1d/
(8) update pypi with new release version
python setup.py sdist upload
(9) check that the new pypi version runs (single machine should be fine)
# create virtualenv
cd ~
conda create -n piptest pip numpy matplotlib scipy wxpython pyparsing
activate piptest
pip install refl1d
python -m refl1d.main
pythonw -m refl1d.main --edit
# would be nice to run tests against installed version, but not yet possible
deactivate
rm -r ~/anaconda/envs/piptest
(10) update shared resources with new versions
ssh sparkle // shimmer
cd ~/src/periodictable && git pull
cd ~/src/bumps && git pull
cd ~/src/refl1d && git pull && python setup.py build
ssh rocks
pip install --user --no-deps periodictable bumps refl1d
(11) announce release
update reflectometry.org web pages
send message to reflectometry announcement list
EOF