Skip to content

Commit

Permalink
Document how to release a new version
Browse files Browse the repository at this point in the history
  • Loading branch information
ento committed Jul 27, 2020
1 parent dc00f85 commit 39075c5
Show file tree
Hide file tree
Showing 4 changed files with 61 additions and 0 deletions.
3 changes: 3 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -10,3 +10,6 @@ build/
.cache
.doit.db
/env
/node_modules
/packages
/package-lock.json
1 change: 1 addition & 0 deletions MANIFEST.in
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,7 @@ exclude ci.sh
exclude dependencies.yml
exclude dodo.py
exclude setup.py
exclude RELEASING.md
exclude *.in
exclude *.lock
exclude *.nix
Expand Down
45 changes: 45 additions & 0 deletions RELEASING.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,45 @@
```bash
version=1.0.0
git checkout -b release-$version
nix-shell

# bump the version
vi pyproject.toml

# configure poetry
poetry config repositories.test https://test.pypi.org/legacy/
poetry config repositories.local http://127.0.0.1:8080/

# in a different shell; if testing the package locally
mkdir -p packages
pypi-server -p 8080 -i 127.0.0.1 -P . -a . --overwrite ./packages

# publish to local / test pypi
poetry build -v
poetry publish -r local # user/pass can be anything
# or
poetry publish -r test

# make a virtualenv and install prereqs
rm -rf env
python -m venv env
. env/bin/activate
npm install elm

# final check
pip install -i http://localhost:8080/ --extra-index-url https://pypi.org/simple elm-doc
# or
pip install -i https://test.pypi.org/simple/ --extra-index-url https://pypi.org/simple elm-doc
rm -rf workspace/0.19.1/build/docs
elm-doc workspace/0.19.1 -o workspace/0.19.1/build/docs --mount-at /docs --elm-path ./node_modules/.bin/elm
spark workspace/0.19.1/build
# open http://localhost:8080/docs and click around
git push # make sure CI is green

# publish to the real pypi
poetry build -v
poetry publish
git tag $version

# merge the branch to master and push the tag
```
12 changes: 12 additions & 0 deletions shell.nix
Original file line number Diff line number Diff line change
Expand Up @@ -65,6 +65,17 @@ let
nativeBuildInputs = with self; [ intreehooks ];
dontUseSetuptoolsCheck = true;
};
pypiserver = self.buildPythonPackage rec {
pname = "pypiserver";
version = "1.3.2";
format = "pyproject";
src = self.fetchPypi {
inherit pname version;
sha256 = "0qnf3qg0mx1whbysq072y0wpj0s3kkld96wzfmnqdi72mk8f3li1";
extension = "zip";
};
propagatedBuildInputs = with self; [ setuptools setuptools-git wheel ];
};
virtualenv = super.virtualenv.overridePythonAttrs (old: rec {
version = "20.0.26";
src = self.fetchPypi {
Expand Down Expand Up @@ -92,6 +103,7 @@ pkgs.mkShell {
libffi
nodejs
python.pkgs.poetry
python.pkgs.pypiserver
rsync
spark
];
Expand Down

0 comments on commit 39075c5

Please sign in to comment.