Skip to content

Commit

Permalink
Unify versioning within Debian packages and with snaps (#402)
Browse files Browse the repository at this point in the history
* Bump checkbox core snaps version: 2.1.dev → 2.3.dev

* remove .dev suffix from snapcraft.yaml versions

* new unified .bumpversion.cfg

* deb version alignment

* New bumpversion workflow

* New deb beta workflow

* Rename beta workflows

* Update checkbox snaps and core snaps triggers

The beta workflows will run when someone pushes a tag that starts with "v"

* Remove unnecessary newline in .bumpversion.cfg
  • Loading branch information
yphus committed Mar 31, 2023
1 parent 3e2a87e commit 849abb3
Show file tree
Hide file tree
Showing 51 changed files with 266 additions and 640 deletions.
79 changes: 79 additions & 0 deletions .bumpversion.cfg
Original file line number Diff line number Diff line change
@@ -0,0 +1,79 @@
[bumpversion]
current_version = 2.3
parse = (?P<major>\d+)\.(?P<minor>\d+)
serialize = {major}.{minor}
search = version: '{current_version}'
replace = version: '{new_version}'
message = Bump version: {current_version} → {new_version}

[bumpversion:file:checkbox-core-snap/series16/snap/snapcraft.yaml]

[bumpversion:file:checkbox-core-snap/series18/snap/snapcraft.yaml]

[bumpversion:file:checkbox-core-snap/series20/snap/snapcraft.yaml]

[bumpversion:file:checkbox-core-snap/series22/snap/snapcraft.yaml]

[bumpversion:file:checkbox-snap/series_uc16/snap/snapcraft.yaml]

[bumpversion:file:checkbox-snap/series_uc18/snap/snapcraft.yaml]

[bumpversion:file:checkbox-snap/series_uc20/snap/snapcraft.yaml]

[bumpversion:file:checkbox-snap/series_uc22/snap/snapcraft.yaml]

[bumpversion:file:checkbox-snap/series_classic18/snap/snapcraft.yaml]

[bumpversion:file:checkbox-snap/series_classic16/snap/snapcraft.yaml]

[bumpversion:file:checkbox-snap/series_classic20/snap/snapcraft.yaml]

[bumpversion:file:checkbox-snap/series_classic22/snap/snapcraft.yaml]

[bumpversion:file:checkbox-ng/setup.py]
search = version="{current_version}"
replace = version="{new_version}"

[bumpversion:file:checkbox-ng/checkbox_ng/__init__.py]
search = __version__ = '{current_version}'
replace = __version__ = '{new_version}'

[bumpversion:file:checkbox-ng/plainbox/__init__.py]
search = __version__ = '{current_version}'
replace = __version__ = '{new_version}'

[bumpversion:file:checkbox-support/setup.py]
search = version="{current_version}"
replace = version="{new_version}"

[bumpversion:file:providers/base/manage.py]
search = version="{current_version}"
replace = version="{new_version}"

[bumpversion:file:providers/certification-client/manage.py]
search = version="{current_version}"
replace = version="{new_version}"

[bumpversion:file:providers/certification-server/manage.py]
search = version="{current_version}"
replace = version="{new_version}"

[bumpversion:file:providers/gpgpu/manage.py]
search = version="{current_version}"
replace = version="{new_version}"

[bumpversion:file:providers/resource/manage.py]
search = version="{current_version}"
replace = version="{new_version}"

[bumpversion:file:providers/sru/manage.py]
search = version="{current_version}"
replace = version="{new_version}"

[bumpversion:file:providers/tpm2/manage.py]
search = version="{current_version}"
replace = version="{new_version}"

[bumpversion:part:release]
optional_value = RELEASE
values = RELEASE
30 changes: 30 additions & 0 deletions .github/workflows/bumpversion.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,30 @@
name: Bump checkbox version

on:
workflow_dispatch:
inputs:
increment:
description: 'release increment'
default: 'minor'
type: choice
options:
- minor
- major

jobs:
Bumpversion:
runs-on: ubuntu-latest
steps:
- name: Install dependencies
run: |
sudo apt update -qq
sudo apt install -qq -y bumpversion devscripts
- name: Checkout checkbox monorepo
uses: actions/checkout@v3
- name: Bump versions
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
DEBEMAIL: robot@canonical.com
DEBFULLNAME: Devices Certification Bot
run: |
tools/release/bumpversion.sh ${{ inputs.increment }}
6 changes: 3 additions & 3 deletions .github/workflows/checkbox-core-snap-beta-release.yml
Original file line number Diff line number Diff line change
@@ -1,10 +1,10 @@
name: Autorelease beta version of checkbox-core-snap
run-name: Beta release of checkbox-core-snap ${{ github.ref_name }}
name: Beta version of checkbox-core-snap
run-name: Beta version of checkbox-core-snap ${{ github.ref_name }}

on:
push:
tags:
- "checkbox-core-snap-v*"
- "v*"
workflow_dispatch:

jobs:
Expand Down
6 changes: 3 additions & 3 deletions .github/workflows/checkbox-snap-beta-release.yml
Original file line number Diff line number Diff line change
@@ -1,10 +1,10 @@
name: Autorelease beta version of checkbox-snap
run-name: Beta release of checkbox-snap ${{ github.ref_name }}
name: Beta version of checkbox-snap
run-name: Beta version of checkbox-snap ${{ github.ref_name }}

on:
push:
tags:
- "checkbox-snap-v*"
- "v*"
workflow_dispatch:

jobs:
Expand Down
27 changes: 27 additions & 0 deletions .github/workflows/deb-beta-release.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,27 @@
name: Beta version of deb packages
run-name: Beta version of deb packages ${{ github.ref_name }}

on:
push:
tags:
- "v*"
workflow_dispatch:

jobs:
Release:
runs-on: ubuntu-latest
steps:
- name: Install dependencies
run: |
sudo apt update -qq
sudo apt install -qq -y python3-launchpadlib
- name: Checkout checkbox monorepo
uses: actions/checkout@v3
- name: Update the PPA recipes and kick-off the builds
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
LP_CREDENTIALS: ${{ secrets.LP_CREDS }}
CHECKBOX_REPO: ${{ github.repository }}
run: |
gh release create $(git describe --tags --abbrev=0 --match v*) -d --generate-notes
tools/release/release_deb_monorepo.py
65 changes: 0 additions & 65 deletions .github/workflows/deb_release.yml

This file was deleted.

23 changes: 0 additions & 23 deletions checkbox-core-snap/.bumpversion.cfg

This file was deleted.

2 changes: 1 addition & 1 deletion checkbox-core-snap/series16/snap/snapcraft.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ description: "Checkbox runtime and public providers"
grade: stable
confinement: strict

version: '2.1.dev'
version: '2.3'

base: core

Expand Down
2 changes: 1 addition & 1 deletion checkbox-core-snap/series18/snap/snapcraft.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ description: "Checkbox runtime and public providers"
grade: stable
confinement: strict

version: '2.1.dev'
version: '2.3'

base: core18

Expand Down
2 changes: 1 addition & 1 deletion checkbox-core-snap/series20/snap/snapcraft.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ description: "Checkbox runtime and public providers"
grade: stable
confinement: strict

version: '2.1.dev'
version: '2.3'

base: core20

Expand Down
2 changes: 1 addition & 1 deletion checkbox-core-snap/series22/snap/snapcraft.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ description: "Checkbox runtime and public providers"
grade: stable
confinement: strict

version: '2.1.dev'
version: '2.3'

base: core22

Expand Down
16 changes: 0 additions & 16 deletions checkbox-ng/.bumpversion.cfg

This file was deleted.

3 changes: 2 additions & 1 deletion checkbox-ng/checkbox_ng/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -24,4 +24,5 @@
CheckBoxNG is a new version of CheckBox built on top of PlainBox
"""

__version__ = '2.2.0'
__version__ = '2.3'

6 changes: 6 additions & 0 deletions checkbox-ng/debian/changelog
Original file line number Diff line number Diff line change
@@ -1,3 +1,9 @@
checkbox-ng (2.3) UNRELEASED; urgency=medium

* new upstream version

-- Devices Certification Bot <robot@canonical.com> Thu, 30 Mar 2023 23:18:15 +0000

checkbox-ng (2.2.0) unstable; urgency=medium

* "new upstream version"
Expand Down
2 changes: 1 addition & 1 deletion checkbox-ng/plainbox/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@
# PEP440 compliant version declaration.
#
# This is used by @public decorator to enforce our public API guarantees.
__version__ = '2.2.0'
__version__ = '2.3'

def get_version_string():
import os
Expand Down
2 changes: 1 addition & 1 deletion checkbox-ng/setup.py
Original file line number Diff line number Diff line change
Expand Up @@ -55,7 +55,7 @@

setup(
name="checkbox-ng",
version="2.2.0",
version="2.3",
url="https://launchpad.net/checkbox-ng/",
packages=find_packages(),
author="Zygmunt Krynicki",
Expand Down
31 changes: 0 additions & 31 deletions checkbox-snap/.bumpversion.cfg

This file was deleted.

2 changes: 1 addition & 1 deletion checkbox-snap/series_classic16/snap/snapcraft.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ summary: Checkbox test runner
description: |
Checkbox is a flexible test automation software.
It’s the main tool used in Ubuntu Certification program.
version: '2.5.dev'
version: '2.3'
grade: stable
confinement: classic

Expand Down
2 changes: 1 addition & 1 deletion checkbox-snap/series_classic18/snap/snapcraft.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ summary: Checkbox test runner
description: |
Checkbox is a flexible test automation software.
It’s the main tool used in Ubuntu Certification program.
version: '2.5.dev'
version: '2.3'
grade: stable
confinement: classic

Expand Down

0 comments on commit 849abb3

Please sign in to comment.