Skip to content

Commit 49c8433

Browse files
committed
chore: housekeeping
1 parent 89182bb commit 49c8433

File tree

7 files changed

+18
-17
lines changed

7 files changed

+18
-17
lines changed

Jenkinsfile

Lines changed: 11 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -8,6 +8,10 @@ pipeline {
88
ansiColor('xterm')
99
}
1010

11+
environment {
12+
PYTHON_PACKAGE = 'version-query'
13+
}
14+
1115
agent {
1216
dockerfile {
1317
additionalBuildArgs '--build-arg USER_ID=${USER_ID} --build-arg GROUP_ID=${GROUP_ID}' \
@@ -20,7 +24,7 @@ pipeline {
2024

2125
stage('Lint') {
2226
environment {
23-
PYTHON_MODULES = 'version_query test *.py'
27+
PYTHON_MODULES = "${env.PYTHON_PACKAGE.replace('-', '_')} test *.py"
2428
}
2529
steps {
2630
sh """#!/usr/bin/env bash
@@ -79,7 +83,6 @@ pipeline {
7983
}
8084
}
8185
environment {
82-
PACKAGE_NAME = 'version-query'
8386
VERSION = sh(script: 'python3 -m version_query --predict .', returnStdout: true).trim()
8487
PYPI_AUTH = credentials('mbdev-pypi-auth')
8588
TWINE_USERNAME = "${PYPI_AUTH_USR}"
@@ -90,9 +93,9 @@ pipeline {
9093
sh """#!/usr/bin/env bash
9194
set -Eeuxo pipefail
9295
python3 -m twine upload \
93-
dist/${PACKAGE_NAME.replace('-', '_')}-${VERSION}-py3-none-any.whl \
94-
dist/${PACKAGE_NAME}-${VERSION}.tar.gz \
95-
dist/${PACKAGE_NAME}-${VERSION}.zip
96+
dist/${PYTHON_PACKAGE.replace('-', '_')}-${VERSION}-py3-none-any.whl \
97+
dist/${PYTHON_PACKAGE}-${VERSION}.tar.gz \
98+
dist/${PYTHON_PACKAGE}-${VERSION}.zip
9699
"""
97100
}
98101
}
@@ -102,15 +105,14 @@ pipeline {
102105
buildingTag()
103106
}
104107
environment {
105-
PACKAGE_NAME = 'version-query'
106108
VERSION = sh(script: 'python3 -m version_query .', returnStdout: true).trim()
107109
}
108110
steps {
109111
script {
110112
githubUtils.createRelease([
111-
"dist/${PACKAGE_NAME.replace('-', '_')}-${VERSION}-py3-none-any.whl",
112-
"dist/${PACKAGE_NAME}-${VERSION}.tar.gz",
113-
"dist/${PACKAGE_NAME}-${VERSION}.zip"
113+
"dist/${PYTHON_PACKAGE.replace('-', '_')}-${VERSION}-py3-none-any.whl",
114+
"dist/${PYTHON_PACKAGE}-${VERSION}.tar.gz",
115+
"dist/${PYTHON_PACKAGE}-${VERSION}.zip"
114116
])
115117
}
116118
}

pyproject.toml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
[build-system]
22
requires = [
3-
'boilerplates[setup] ~= 0.5',
3+
'boilerplates[setup] ~= 1.0',
44
'GitPython ~= 3.1',
55
'packaging >= 23.0',
66
'semver ~= 2.13'

requirements.txt

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
boilerplates[logging] ~= 0.5
1+
boilerplates[logging] ~= 1.0
22
GitPython ~= 3.1
33
packaging >= 23.0
44
semver ~= 2.13

requirements_test.txt

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,3 @@
11
-r requirements.txt
2-
boilerplates[git_repo_tests,packaging_tests] ~= 0.5
2+
boilerplates[git_repo_tests,packaging_tests] ~= 1.0
33
setuptools >= 67.4

setup.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -31,8 +31,8 @@ class Package(boilerplates.setup.Package):
3131
'Topic :: Utilities',
3232
'Typing :: Typed']
3333
keywords = [
34-
'automation', 'continous integration', 'git', 'releasing', 'semantic versioning', 'tagging',
35-
'versioning']
34+
'automation', 'continuous integration', 'git', 'releasing', 'semantic versioning',
35+
'tagging', 'versioning']
3636

3737

3838
if __name__ == '__main__':

test/__init__.py

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,6 @@
11
"""Initialization of tests of version_query package."""
22

33
import logging
4-
import os
54

65
from version_query.__main__ import Logging
76

@@ -12,4 +11,4 @@ class TestsLogging(Logging):
1211
level_package = logging.DEBUG
1312

1413

15-
TestsLogging.configure_basic()
14+
TestsLogging.configure()

version_query/__main__.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -15,5 +15,5 @@ class Logging(boilerplates.logging.Logging):
1515

1616

1717
if __name__ == '__main__':
18-
Logging().configure_basic()
18+
Logging.configure()
1919
main()

0 commit comments

Comments
 (0)