Skip to content

Commit 39075c5

Browse files
committed
Document how to release a new version
1 parent dc00f85 commit 39075c5

File tree

4 files changed

+61
-0
lines changed

4 files changed

+61
-0
lines changed

.gitignore

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -10,3 +10,6 @@ build/
1010
.cache
1111
.doit.db
1212
/env
13+
/node_modules
14+
/packages
15+
/package-lock.json

MANIFEST.in

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -7,6 +7,7 @@ exclude ci.sh
77
exclude dependencies.yml
88
exclude dodo.py
99
exclude setup.py
10+
exclude RELEASING.md
1011
exclude *.in
1112
exclude *.lock
1213
exclude *.nix

RELEASING.md

Lines changed: 45 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,45 @@
1+
```bash
2+
version=1.0.0
3+
git checkout -b release-$version
4+
nix-shell
5+
6+
# bump the version
7+
vi pyproject.toml
8+
9+
# configure poetry
10+
poetry config repositories.test https://test.pypi.org/legacy/
11+
poetry config repositories.local http://127.0.0.1:8080/
12+
13+
# in a different shell; if testing the package locally
14+
mkdir -p packages
15+
pypi-server -p 8080 -i 127.0.0.1 -P . -a . --overwrite ./packages
16+
17+
# publish to local / test pypi
18+
poetry build -v
19+
poetry publish -r local # user/pass can be anything
20+
# or
21+
poetry publish -r test
22+
23+
# make a virtualenv and install prereqs
24+
rm -rf env
25+
python -m venv env
26+
. env/bin/activate
27+
npm install elm
28+
29+
# final check
30+
pip install -i http://localhost:8080/ --extra-index-url https://pypi.org/simple elm-doc
31+
# or
32+
pip install -i https://test.pypi.org/simple/ --extra-index-url https://pypi.org/simple elm-doc
33+
rm -rf workspace/0.19.1/build/docs
34+
elm-doc workspace/0.19.1 -o workspace/0.19.1/build/docs --mount-at /docs --elm-path ./node_modules/.bin/elm
35+
spark workspace/0.19.1/build
36+
# open http://localhost:8080/docs and click around
37+
git push # make sure CI is green
38+
39+
# publish to the real pypi
40+
poetry build -v
41+
poetry publish
42+
git tag $version
43+
44+
# merge the branch to master and push the tag
45+
```

shell.nix

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -65,6 +65,17 @@ let
6565
nativeBuildInputs = with self; [ intreehooks ];
6666
dontUseSetuptoolsCheck = true;
6767
};
68+
pypiserver = self.buildPythonPackage rec {
69+
pname = "pypiserver";
70+
version = "1.3.2";
71+
format = "pyproject";
72+
src = self.fetchPypi {
73+
inherit pname version;
74+
sha256 = "0qnf3qg0mx1whbysq072y0wpj0s3kkld96wzfmnqdi72mk8f3li1";
75+
extension = "zip";
76+
};
77+
propagatedBuildInputs = with self; [ setuptools setuptools-git wheel ];
78+
};
6879
virtualenv = super.virtualenv.overridePythonAttrs (old: rec {
6980
version = "20.0.26";
7081
src = self.fetchPypi {
@@ -92,6 +103,7 @@ pkgs.mkShell {
92103
libffi
93104
nodejs
94105
python.pkgs.poetry
106+
python.pkgs.pypiserver
95107
rsync
96108
spark
97109
];

0 commit comments

Comments
 (0)