-
Notifications
You must be signed in to change notification settings - Fork 67
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge master into 0.3-include-nonignored
- Loading branch information
Showing
14 changed files
with
329 additions
and
37 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,91 @@ | ||
# Steps | ||
|
||
Release early, release often. Don't be lazy. | ||
|
||
|
||
## Preparation | ||
|
||
- update master and run tests | ||
|
||
git fetch upstream | ||
git merge upstream/master | ||
source venv/bin/activate | ||
./run_tests | ||
|
||
- create a new release branch | ||
|
||
git checkout -b release-0.3.0 | ||
|
||
- create release notes after all main changes from last tag | ||
|
||
git log --first-parent master --decorate | ||
|
||
- tag the release (using those release notes) | ||
|
||
git tag -s 0.3.0 | ||
|
||
|
||
## Check all is ready | ||
|
||
- build a tarball to test | ||
|
||
rm -rf dist/ | ||
./setup.py sdist bdist_wheel | ||
|
||
- try the tarball | ||
|
||
mkdir /tmp/testrelease | ||
cp dist/charmcraft-0.3.0.tar.gz /tmp/testrelease/ | ||
cd /tmp/testrelease/ | ||
tar -xf charmcraft-0.3.0.tar.gz | ||
cd ~ # wherever out of the project, to avoid any potential "file mispicking" | ||
fades -v -d file:///tmp/testrelease/charmcraft-0.3.0/ -x charmcraft version | ||
|
||
- back in the project, build all the snaps for different architectures | ||
|
||
snapcraft remote-build | ||
|
||
- try the snap (for your arch) | ||
|
||
sudo snap install --dangerous charmcraft_0.3.0_amd64.snap | ||
cd ~ # wherever out of the project, to avoid any potential "file mispicking" | ||
charmcraft version | ||
|
||
|
||
## Release | ||
|
||
- push the tags to upstream | ||
|
||
git push --tags upstream | ||
|
||
- release in Github | ||
|
||
xdg-open https://github.com/canonical/charmcraft/tags | ||
(you should see all project tags, the top one should be this release's one) | ||
In the menu at right of the tag tag you just created, choose 'create release' | ||
Copy the release notes into the release description | ||
Attach the `dist/` files | ||
Click on "Publish release" | ||
|
||
- release to PyPI | ||
|
||
fades -d twine -x twine upload --verbose dist/* | ||
|
||
- release to Snap Store (for all the archs) | ||
|
||
snapcraft upload charmcraft_0.3.0_amd64.snap --release=edge,beta | ||
snapcraft upload charmcraft_0.3.0_s390x.snap --release=edge,beta | ||
... | ||
|
||
- verify all archs are consistent: | ||
|
||
snapcraft status charmcraft | ||
|
||
|
||
## Final details | ||
|
||
- update IRC channel topic | ||
|
||
- finally change the version number in `charmcraft/version.py` | ||
|
||
- commit, push, create a PR for the branch |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,61 @@ | ||
Steps: | ||
|
||
- First check that snapcraft is able build something: | ||
|
||
``` | ||
snapcraft | ||
``` | ||
|
||
- Install it and try it, something like the following, replacing | ||
the snap name with the one you just built: | ||
|
||
``` | ||
sudo snap install --dangerous charmcraft_0.2.0+95.g6f8c4cc_amd64.snap | ||
``` | ||
|
||
- If needs to be fixed, see section(s) below, GOTO 10 | ||
|
||
|
||
## How to add new Python dependencies | ||
|
||
If trying a new snap fails because import errors, you need to include new | ||
dependencies. Easiest way to do this is to open the snap, manually copy the | ||
needed dependency, and try it: if it keeps failing, keep adding more dependencies, | ||
else you're done and just update the `stage` section in `snapcraft.yaml` | ||
with what you brought in. | ||
|
||
Let's go on that procedure. First open the just built snap: | ||
|
||
``` | ||
unsquashfs charmcraft_0.2.0+95.g6f8c4cc_amd64.snap | ||
``` | ||
|
||
Copy the dependencies files you need. For example, for the `tabulate` lib | ||
it needs to be included: | ||
|
||
``` | ||
tabulate-0.8.7.dist-info | ||
tabulate.py | ||
``` | ||
|
||
Remember to not be *that* specific in `snapcraft.yaml`, where you could just | ||
annotate: | ||
|
||
``` | ||
- lib/tabulate-*.dist-info | ||
- lib/tabulate.py | ||
``` | ||
|
||
You can find these files in the project's virtualenv. So: | ||
|
||
``` | ||
cp env/lib/python3.8/site-packages/tabulate* squashfs-root/lib/ | ||
``` | ||
|
||
Install the snap from the unsquashed dir... | ||
|
||
``` | ||
sudo snap try squashfs-root/ | ||
``` | ||
|
||
...and try again. |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.