Skip to content

Commit

Permalink
Merge pull request #47 from nsidc/beta-release-prep
Browse files Browse the repository at this point in the history
Bumpversion / CHANGELOG setup
  • Loading branch information
mfisher87 committed Dec 23, 2021
2 parents 0eacb18 + 8bd3e09 commit 5315a61
Show file tree
Hide file tree
Showing 8 changed files with 89 additions and 7 deletions.
38 changes: 38 additions & 0 deletions .bumpversion.cfg
Original file line number Diff line number Diff line change
@@ -0,0 +1,38 @@
[bumpversion]
current_version = 0.1.0
commit = True
tag = False
parse = ^
(?P<major>\d+)\.(?P<minor>\d+)\.(?P<patch>\d+) # minimum 'N.N.N'
(?:
(?P<prerelease>alpha|beta|rc)
(?P<build>\d+)
)?
$
serialize =
{major}.{minor}.{patch}{prerelease}{build}
{major}.{minor}.{patch}

[bumpversion:part:prerelease]
optional_value = final
values =
final
alpha
beta
rc
final

[bumpversion:part:build]
first_value = 1

[bumpversion:file:metadata.txt]
search = version={current_version}
replace = version={new_version}

[bumpversion:file:CHANGELOG.md]
search = NEXT_VERSION
replace = v{new_version} ({now:%Y-%m-%d})

[bumpversion:file:help/source/conf.py]
search = release = 'v{current_version}'
replace = release = 'v{new_version}'
3 changes: 3 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
# v0.1.0 (2021-12-23)

Initial release
15 changes: 15 additions & 0 deletions dev-requirements.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
###############################################################################
# The runtime dependencies are limited to only the QGIS environment. These dev
# dependencies only provide support for non-runtime behaviors, e.g.:
# building docs locally, bumping versions, static analysis, etc.
###############################################################################

# Documentation:
sphinx ~=4.3.2
sphinx-rtd-theme ~=1.0.0
myst-parser ~=0.15.2

# Version management:
bump2version ~=1.0.1

# Static analysis: TODO
7 changes: 5 additions & 2 deletions help/requirements.txt
Original file line number Diff line number Diff line change
@@ -1,3 +1,6 @@
sphinx ~=4.3.2
sphinx-rtd-theme==1.0.0
# Only for use by ReadTheDocs build system.
# ReadTheDocs already includes:
# - sphinx
# - sphinx-rtd-theme

myst-parser==0.15.2
4 changes: 2 additions & 2 deletions help/source/conf.py
Original file line number Diff line number Diff line change
Expand Up @@ -55,9 +55,9 @@
# built documents.
#
# The short X.Y version.
version = '0.1'
# version = '0.1' # Do we need this?
# The full version, including alpha/beta/rc tags.
release = '0.1'
release = 'v0.1.0'

# The language for content autogenerated by Sphinx. Refer to documentation
# for a list of supported languages.
Expand Down
23 changes: 23 additions & 0 deletions help/source/contributor-how-to/release.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,28 @@
# How to release a new version of QGreenland Custom

## Increment the version

Use `bumpversion` to bump the specified part of the version:

```
$ bumpversion --part={major|minor|patch}
```

Versions should be in one of the following forms:

* `vX.Y.ZalphaN`: An alpha pre-release, e.g. `v1.2.3beta2`
* `vX.Y.ZbetaN`: A beta pre-release, e.g. `v1.2.3alpha2`
* `vX.Y.ZrcN`: A release candidate, e.g. `v1.2.3rc3`.
* `vX.Y.Z`: A final release, e.g. `v1.2.3`.

```{note}
When using `bumpversion build`, ensure you've already used `bumpversion
prerelease`. Running `bumpversion build` from a final release version number
can result in an incorrect patch number, e.g. `v1.2.304`.
```


## Build a package zip

```
Expand Down
4 changes: 2 additions & 2 deletions help/source/contributor-how-to/write-documentation.md
Original file line number Diff line number Diff line change
Expand Up @@ -6,10 +6,10 @@ To preview docs locally, create a local Python environment and install
dependencies, then make the docs.

```
cd help
virtualenv env
. env/bin/activate
pip install -r requirements.txt
pip install -r dev-requirements.txt
cd help
make html
```

Expand Down
2 changes: 1 addition & 1 deletion metadata.txt
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@
name=QGreenland Custom
qgisMinimumVersion=3.16
description=Download QGreenland dataset
version=0.1
version=0.1.0
author=Matteo Ghetta (Faunalia)
email=matteo.ghetta@faunalia.eu

Expand Down

0 comments on commit 5315a61

Please sign in to comment.