add release workflow
This commit is contained in:
parent
37864994f9
commit
360c5bb96f
4 changed files with 26 additions and 5 deletions
2
.gitignore
vendored
2
.gitignore
vendored
|
|
@ -5,3 +5,5 @@
|
|||
__pycache__/
|
||||
*.src.rpm
|
||||
*.tar.gz
|
||||
/FRAG.md
|
||||
/GIT_MSG
|
||||
|
|
|
|||
2
NEWS.md
Normal file
2
NEWS.md
Normal file
|
|
@ -0,0 +1,2 @@
|
|||
NEWS
|
||||
========
|
||||
|
|
@ -4,8 +4,8 @@
|
|||
%bcond tests 1
|
||||
|
||||
Name: forge-srpm-macros
|
||||
Version: 0.1.0
|
||||
Release: 1%{?dist}
|
||||
Version: 0.0.1
|
||||
Release: 0%{?dist}
|
||||
Summary: Macros to simplify packaging of forge-hosted projects
|
||||
|
||||
License: GPL-1.0-or-later
|
||||
|
|
@ -54,7 +54,4 @@ export MACRO_LUA_DIR="%{buildroot}/usr/lib/rpm/lua"
|
|||
%{_rpmluadir}/fedora/srpm/forge.lua
|
||||
|
||||
|
||||
|
||||
%changelog
|
||||
* Fri Aug 11 2023 Maxwell G <maxwell@gtmx.me> - 0.1.0-1
|
||||
- Initial package.
|
||||
|
|
|
|||
20
noxfile.py
20
noxfile.py
|
|
@ -8,12 +8,20 @@ from pathlib import Path
|
|||
|
||||
import nox
|
||||
|
||||
RELEASERR = "releaserr @ git+https://git.sr.ht/~gotmax23/releaserr"
|
||||
LINT_SESSIONS = ("static", "formatters", "typing")
|
||||
PY_FILES = ("tests", "noxfile.py")
|
||||
YAML_FILES = (".builds", "tests/vectors.yaml")
|
||||
|
||||
nox.options.sessions = (*LINT_SESSIONS, "test")
|
||||
|
||||
# Helpers
|
||||
|
||||
def git(session: nox.Session, *args, **kwargs):
|
||||
return session.run("git", *args, **kwargs, external=True)
|
||||
|
||||
|
||||
# General
|
||||
|
||||
@nox.session(venv_backend="none")
|
||||
def lint(session: nox.Session):
|
||||
|
|
@ -81,3 +89,15 @@ def mockbuild(session: nox.Session):
|
|||
if not session.interactive:
|
||||
margs.append("--verbose")
|
||||
session.run(*margs, external=True)
|
||||
|
||||
|
||||
@nox.session
|
||||
def bump(session: nox.Session):
|
||||
version = session.posargs[0]
|
||||
session.install(RELEASERR, "fclogr")
|
||||
session.run("releaserr", "check-tag", version)
|
||||
session.run(
|
||||
"fclogr", "bump", "--new", version, "--comment", f"Update to {version}."
|
||||
)
|
||||
git(session, "add", "forge-srpm-macros.spec")
|
||||
session.run("releaserr", "clog", version, "--tag")
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue