Skip to content
Draft
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
35 changes: 0 additions & 35 deletions .github/workflows/pub-pypi.yml

This file was deleted.

17 changes: 17 additions & 0 deletions .github/workflows/release-validation.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,17 @@
name: Release validation
on:
pull_request:
branches: release
types: [ opened, edited ]

concurrency:
group: ${{ github.workflow }}
cancel-in-progress: false

jobs:
release:
uses: netboxlabs/public-workflows/.github/workflows/reusable-plugin-release-validation.yml@develop
with:
plugin_package_name: netbox-qrcode
plugin_package_dir: netbox_qrcode
secrets: inherit
17 changes: 17 additions & 0 deletions .github/workflows/release.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,17 @@
name: Release
on:
push:
branches: [ release ]

concurrency:
group: ${{ github.workflow }}
cancel-in-progress: false

jobs:
release:
uses: netboxlabs/public-workflows/.github/workflows/reusable-plugin-release.yml@develop
with:
plugin_package_name: netbox-qrcode
plugin_package_dir: netbox_qrcode
release_notes_from_pr_body: false
secrets: inherit
22 changes: 0 additions & 22 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -47,28 +47,6 @@ migrations:
run netbox python manage.py makemigrations --name ${BUILD_NAME}
docker-compose -f ${COMPOSE_FILE} -p ${BUILD_NAME} down


relpatch:
$(eval GSTATUS := $(shell git status --porcelain))
ifneq ($(GSTATUS),)
$(error Git status is not clean. $(GSTATUS))
endif
git checkout develop
git remote update
git pull origin develop
$(eval CURVER := $(shell cat $(VERFILE) | grep -oE '[0-9]+\.[0-9]+\.[0-9]+'))
$(eval NEWVER := $(shell pysemver bump patch $(CURVER)))
$(eval RDATE := $(shell date '+%Y-%m-%d'))
git checkout -b release-$(NEWVER) origin/develop
echo '__version__ = "$(NEWVER)"' > $(VERFILE)
git commit -am 'bump ver'
git push origin release-$(NEWVER)
git checkout develop

pbuild:
python3 -m pip install --upgrade build
python3 -m build

pypipub:
python3 -m pip install --upgrade twine
python3 -m twine upload dist/*
4 changes: 2 additions & 2 deletions netbox_qrcode/__init__.py
Original file line number Diff line number Diff line change
@@ -1,12 +1,12 @@
from netbox.plugins import PluginConfig
from .version import __version__
from .version import version_semver


class QRCodeConfig(PluginConfig):
name = 'netbox_qrcode'
verbose_name = 'qrcode'
description = 'Generate QR codes for the objects'
version = __version__
version = version_semver()
author = 'Nikolay Yuzefovich'
author_email = '[email protected]'
required_settings = []
Expand Down
19 changes: 18 additions & 1 deletion netbox_qrcode/version.py
Original file line number Diff line number Diff line change
@@ -1 +1,18 @@
__version__ = "0.0.13"
#!/usr/bin/env python
"""Version stamp."""

# These properties are injected at build time by the build process.

__commit_hash__ = "unknown"
__track__ = "dev"
__version__ = "0.0.0"


def version_display():
"""Display the version, track and hash together."""
return f"v{__version__}-{__track__}-{__commit_hash__}"


def version_semver():
"""Semantic version."""
return __version__