Skip to content

Commit 35da933

Browse files
authored
Merge pull request #3 from bjoernricks/create-new-release
Create new release
2 parents 3da53b7 + 0ae0cf3 commit 35da933

4 files changed

Lines changed: 148 additions & 7 deletions

File tree

CHANGELOG.md

Lines changed: 2 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -4,16 +4,12 @@ All notable changes to this project will be documented in this file.
44
The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/),
55
and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html).
66

7-
## [Unreleased]
8-
9-
### Added
7+
## [1.1.0] - 2019-03-28
108

119
### Changed
1210

1311
* Changed git repository location to https://github.com/greenbone/autohooks-plugin-black
1412
* Allow to configure files to be formatted [#1](https://github.com/greenbone/autohooks-plugin-black/pull/1)
1513
* Use new autohooks status API to print messages [#2](https://github.com/greenbone/autohooks-plugin-black/pull/2)
1614

17-
### Removed
18-
19-
### Fixed
15+
[1.1.0]: https://github.com/greenbone/autohooks-plugin-black/compare/v1.0.0...v1.1.0

MANIFEST.in

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,2 @@
1+
include README.md CHANGELOG.md LICENSE pyproject.toml setup.py Pipfile Pipfile.lock
2+
recursive-include tests *.py

RELEASE.md

Lines changed: 143 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,143 @@
1+
# Release instructions
2+
3+
Before creating a new release please do a careful consideration about the
4+
version number for the new release. We are following [Semantic Versioning](https://semver.org/)
5+
and [PEP440](https://www.python.org/dev/peps/pep-0440/).
6+
7+
* Install development dependencies
8+
9+
```sh
10+
pipenv install --dev
11+
```
12+
13+
* Fetch upstream changes and create release branch
14+
15+
```sh
16+
git fetch upstream
17+
git checkout -b create-new-release upstream/master
18+
```
19+
20+
* Open [setup.py](setup.py)
21+
and increment the version number.
22+
23+
* Update [CHANGELOG](CHANGELOG.md)
24+
25+
* Create a distribution files
26+
27+
```sh
28+
rm -rf dist build autohooks_plugin_black.egg-info
29+
python3 setup.py sdist bdist_wheel
30+
```
31+
32+
* Create a git commit
33+
34+
```sh
35+
git add .
36+
git commit -m "Prepare release <version>"
37+
```
38+
39+
* Create a pypirc file
40+
41+
```sh
42+
vim ~/.pypirc
43+
```
44+
45+
with the following content (Note: `<username>` must be replaced)
46+
47+
```ini
48+
[distutils]
49+
index-servers =
50+
pypi
51+
testpypi
52+
53+
[pypi]
54+
username = <username>
55+
56+
[testpypi]
57+
repository = https://test.pypi.org/legacy/
58+
username = <username>
59+
```
60+
61+
* Create an account at [Test PyPI](https://packaging.python.org/guides/using-testpypi/)
62+
63+
* Upload the archives in dist to [Test PyPI](https://test.pypi.org/)
64+
65+
```sh
66+
twine upload -r testpypi dist/*
67+
```
68+
69+
* Check if the package is available at https://test.pypi.org/project/autohooks-plugin-black
70+
71+
* Create a test directory
72+
73+
```sh
74+
mkdir autohooks-install-test
75+
cd autohooks-install-test
76+
pipenv run pip install --pre -I --extra-index-url https://test.pypi.org/simple/ autohooks-plugin-black
77+
```
78+
79+
* Remove test environment
80+
81+
```sh
82+
pipenv --rm
83+
cd ..
84+
rm -rf autohooks-install-test
85+
```
86+
87+
* Create a release PR
88+
89+
```sh
90+
git push origin
91+
```
92+
Open GitHub and create a PR against https://github.com/greenbone/autohooks-plugin-black
93+
94+
* Update after PR is merged
95+
96+
```sh
97+
git fetch upstream
98+
git rebase upstream/master
99+
```
100+
* Create a git tag
101+
102+
```sh
103+
git tag v<version>
104+
```
105+
106+
or even signed with your gpg key
107+
108+
```sh
109+
git tag -s v<version>
110+
```
111+
* Create final distribution files
112+
113+
```sh
114+
rm -rf dist build autohooks_plugin_black.egg-info
115+
python3 setup.py sdist bdist_wheel
116+
```
117+
118+
* Create an account at [PyPI](https://pypi.org/) if not exist already
119+
120+
* Upload to real [PyPI](https://pypi.org/)
121+
122+
```sh
123+
twine upload dist/*
124+
```
125+
126+
* Check if new version is available at https://pypi.org/project/autohooks-plugin-black
127+
128+
* Update version in [setup.py](setup.py)
129+
130+
Use a alpha version like `(1, 1, 1, 'alpha')` or
131+
`(1, 1, 1, 'alpha', 0)`
132+
133+
* Create a commit
134+
135+
```sh
136+
git commit -m "Update version after <version> release"
137+
```
138+
139+
* Push changes and tag to GitHub
140+
141+
```sh
142+
git push --tags upstream master
143+
```

setup.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,7 @@
1818
from pkg_resources import safe_version
1919
from setuptools import setup, find_namespace_packages
2020

21-
VERSION = (1, 1, 0, 'alpha')
21+
VERSION = (1, 1, 0)
2222

2323

2424
def get_version():

0 commit comments

Comments
 (0)