git-stream 2.0.1__tar.gz → 2.0.2__tar.gz
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- git_stream-2.0.2/.github/workflows/build-and-release.yml +31 -0
- {git_stream-2.0.1 → git_stream-2.0.2}/.gitignore +5 -5
- {git_stream-2.0.1 → git_stream-2.0.2}/.p4ignore +5 -4
- {git_stream-2.0.1 → git_stream-2.0.2}/CHANGELOG.md +7 -2
- {git_stream-2.0.1 → git_stream-2.0.2}/PKG-INFO +6 -5
- {git_stream-2.0.1 → git_stream-2.0.2}/git_stream/__init__.py +2 -2
- {git_stream-2.0.1 → git_stream-2.0.2}/git_stream/__main__.py +3 -2
- {git_stream-2.0.1 → git_stream-2.0.2}/pyproject.toml +8 -17
- {git_stream-2.0.1 → git_stream-2.0.2}/setup.py +2 -2
- git_stream-2.0.2/tests/__init__.py +1 -0
- git_stream-2.0.2/tests/test_main.py +123 -0
- {git_stream-2.0.1 → git_stream-2.0.2}/util/update-env.sh +0 -0
- git_stream-2.0.2/vjer-rc.yml +11 -0
- {git_stream-2.0.1 → git_stream-2.0.2}/vjer.yml +10 -2
- git_stream-2.0.1/.github/workflows/build-and-release.yml +0 -141
- {git_stream-2.0.1 → git_stream-2.0.2}/.readthedocs.yml +0 -0
- {git_stream-2.0.1 → git_stream-2.0.2}/DOCUMENTATION.md +0 -0
- {git_stream-2.0.1 → git_stream-2.0.2}/LICENSE +0 -0
- {git_stream-2.0.1 → git_stream-2.0.2}/MANIFEST.in +0 -0
- {git_stream-2.0.1 → git_stream-2.0.2}/README.md +0 -0
- {git_stream-2.0.1 → git_stream-2.0.2}/docs/Makefile +0 -0
- {git_stream-2.0.1 → git_stream-2.0.2}/docs/coding_standards.py +0 -0
- {git_stream-2.0.1 → git_stream-2.0.2}/docs/conf.py +0 -0
- {git_stream-2.0.1 → git_stream-2.0.2}/docs/make.bat +0 -0
- {git_stream-2.0.1 → git_stream-2.0.2}/docs/modules.rst +0 -0
- {git_stream-2.0.1 → git_stream-2.0.2}/docs/requirements.txt +0 -0
- {git_stream-2.0.1 → git_stream-2.0.2}/git_stream/py.typed +0 -0
- {git_stream-2.0.1 → git_stream-2.0.2}/util/Update-Env.ps1 +0 -0
- {git_stream-2.0.1 → git_stream-2.0.2}/util/update-env-core.ps1 +0 -0
|
@@ -0,0 +1,31 @@
|
|
|
1
|
+
name: Git Stream Build and Release
|
|
2
|
+
|
|
3
|
+
on:
|
|
4
|
+
workflow_dispatch:
|
|
5
|
+
inputs:
|
|
6
|
+
skip-pypi-test:
|
|
7
|
+
description: Skip PyPI test
|
|
8
|
+
type: boolean
|
|
9
|
+
push:
|
|
10
|
+
branches:
|
|
11
|
+
- main
|
|
12
|
+
- feature/*
|
|
13
|
+
- release/*
|
|
14
|
+
pull_request:
|
|
15
|
+
branches:
|
|
16
|
+
- main
|
|
17
|
+
- feature/*
|
|
18
|
+
- release/*
|
|
19
|
+
|
|
20
|
+
permissions:
|
|
21
|
+
checks: write
|
|
22
|
+
contents: write
|
|
23
|
+
id-token: write
|
|
24
|
+
|
|
25
|
+
jobs:
|
|
26
|
+
ci-cd:
|
|
27
|
+
uses: arisilon/shared-actions/.github/workflows/python-cicd.yaml@released
|
|
28
|
+
with:
|
|
29
|
+
skip-pypi-test: ${{ inputs.skip-pypi-test || false }}
|
|
30
|
+
test-action: "python -c 'import git_stream; print(git_stream.__version__)'"
|
|
31
|
+
secrets: inherit
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
# File created using '.gitignore Generator' for Visual Studio Code: https://bit.ly/vscode-gig
|
|
2
|
-
# Created by https://www.toptal.com/developers/gitignore/api/windows,visualstudiocode,python,git
|
|
3
|
-
# Edit at https://www.toptal.com/developers/gitignore?templates=windows,visualstudiocode,python,git
|
|
2
|
+
# Created by https://www.toptal.com/developers/gitignore/api/windows,visualstudiocode,python,macos,git
|
|
3
|
+
# Edit at https://www.toptal.com/developers/gitignore?templates=windows,visualstudiocode,python,macos,git
|
|
4
4
|
|
|
5
5
|
### Git ###
|
|
6
6
|
# Created by git for backups. To disable backups in Git:
|
|
@@ -26,6 +26,7 @@
|
|
|
26
26
|
# Icon must end with two \r
|
|
27
27
|
Icon
|
|
28
28
|
|
|
29
|
+
|
|
29
30
|
# Thumbnails
|
|
30
31
|
._*
|
|
31
32
|
|
|
@@ -266,12 +267,11 @@ $RECYCLE.BIN/
|
|
|
266
267
|
# Windows shortcuts
|
|
267
268
|
*.lnk
|
|
268
269
|
|
|
269
|
-
# End of https://www.toptal.com/developers/gitignore/api/windows,visualstudiocode,python,git
|
|
270
|
+
# End of https://www.toptal.com/developers/gitignore/api/windows,visualstudiocode,python,macos,git
|
|
270
271
|
|
|
271
272
|
# Custom rules (everything added below won't be overriden by 'Generate .gitignore File' if you use 'Update' option)
|
|
272
273
|
|
|
273
|
-
.git/
|
|
274
274
|
.p4cfg
|
|
275
275
|
artifacts/
|
|
276
|
-
|
|
276
|
+
test_results*/
|
|
277
277
|
git-stream-*
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
# File created using '.gitignore Generator' for Visual Studio Code: https://bit.ly/vscode-gig
|
|
2
|
-
# Created by https://www.toptal.com/developers/gitignore/api/windows,visualstudiocode,python,git
|
|
3
|
-
# Edit at https://www.toptal.com/developers/gitignore?templates=windows,visualstudiocode,python,git
|
|
2
|
+
# Created by https://www.toptal.com/developers/gitignore/api/windows,visualstudiocode,python,macos,git
|
|
3
|
+
# Edit at https://www.toptal.com/developers/gitignore?templates=windows,visualstudiocode,python,macos,git
|
|
4
4
|
|
|
5
5
|
### Git ###
|
|
6
6
|
# Created by git for backups. To disable backups in Git:
|
|
@@ -26,6 +26,7 @@
|
|
|
26
26
|
# Icon must end with two \r
|
|
27
27
|
Icon
|
|
28
28
|
|
|
29
|
+
|
|
29
30
|
# Thumbnails
|
|
30
31
|
._*
|
|
31
32
|
|
|
@@ -266,12 +267,12 @@ $RECYCLE.BIN/
|
|
|
266
267
|
# Windows shortcuts
|
|
267
268
|
*.lnk
|
|
268
269
|
|
|
269
|
-
# End of https://www.toptal.com/developers/gitignore/api/windows,visualstudiocode,python,git
|
|
270
|
+
# End of https://www.toptal.com/developers/gitignore/api/windows,visualstudiocode,python,macos,git
|
|
270
271
|
|
|
271
272
|
# Custom rules (everything added below won't be overriden by 'Generate .gitignore File' if you use 'Update' option)
|
|
272
273
|
|
|
273
274
|
.git/
|
|
274
275
|
.p4cfg
|
|
275
276
|
artifacts/
|
|
276
|
-
|
|
277
|
+
test_results*/
|
|
277
278
|
git-stream-*
|
|
@@ -7,14 +7,19 @@ and this project adheres to [Semantic Versioning](http://semver.org/).
|
|
|
7
7
|
|
|
8
8
|
## Current Release
|
|
9
9
|
|
|
10
|
+
### [2.0.2] - 2025-06-23
|
|
11
|
+
|
|
12
|
+
- Changed
|
|
13
|
+
- Fixed stream path when repo name starts with a period. (GitHub #4)
|
|
14
|
+
|
|
15
|
+
## Release History
|
|
16
|
+
|
|
10
17
|
### [2.0.1] - 2025-02-16
|
|
11
18
|
|
|
12
19
|
- Changed
|
|
13
20
|
- Moved repo to Arisilon organization. (GitHub #2)
|
|
14
21
|
- Convert from flit to setuptools. (GitHub #3)
|
|
15
22
|
|
|
16
|
-
## Release History
|
|
17
|
-
|
|
18
23
|
### [2.0.0] - 2025-01-01
|
|
19
24
|
|
|
20
25
|
- Changed
|
|
@@ -1,26 +1,27 @@
|
|
|
1
|
-
Metadata-Version: 2.
|
|
1
|
+
Metadata-Version: 2.4
|
|
2
2
|
Name: git-stream
|
|
3
|
-
Version: 2.0.
|
|
3
|
+
Version: 2.0.2
|
|
4
4
|
Summary: Git Stream Implementation
|
|
5
|
-
Keywords:
|
|
5
|
+
Keywords: git,programming,utilities
|
|
6
6
|
Author-email: "Jeffery G. Smith" <web@pobox.com>
|
|
7
7
|
Requires-Python: ~=3.12
|
|
8
8
|
Description-Content-Type: text/markdown
|
|
9
9
|
Classifier: Development Status :: 5 - Production/Stable
|
|
10
|
-
Classifier: License :: OSI Approved :: MIT License
|
|
11
10
|
Classifier: Operating System :: OS Independent
|
|
12
11
|
Classifier: Programming Language :: Python :: 3.12
|
|
13
12
|
Classifier: Intended Audience :: Developers
|
|
14
13
|
Classifier: Topic :: Software Development
|
|
15
14
|
Classifier: Natural Language :: English
|
|
15
|
+
License-File: LICENSE
|
|
16
16
|
Requires-Dist: BatCave
|
|
17
|
-
Requires-Dist: vjer ; extra == "dev"
|
|
18
17
|
Requires-Dist: bumpver ; extra == "dev"
|
|
18
|
+
Requires-Dist: vjer ; extra == "dev"
|
|
19
19
|
Project-URL: changelog, https://github.com/arisilon/git-stream/blob/main/CHANGELOG.md
|
|
20
20
|
Project-URL: documentation, https://git-stream.readthedocs.io
|
|
21
21
|
Project-URL: homepage, https://github.com/arisilon/git-stream/
|
|
22
22
|
Project-URL: repository, https://github.com/arisilon/git-stream/
|
|
23
23
|
Provides-Extra: dev
|
|
24
|
+
Provides-Extra: test
|
|
24
25
|
|
|
25
26
|
# git-stream Python Module
|
|
26
27
|
|
|
@@ -13,7 +13,7 @@ __title__ = 'git-stream'
|
|
|
13
13
|
__summary__ = 'Git Stream Implementation'
|
|
14
14
|
__uri__ = 'https://github.com/arisilon/git-stream/'
|
|
15
15
|
|
|
16
|
-
__version__ = '2.0.
|
|
16
|
+
__version__ = '2.0.2'
|
|
17
17
|
__build_name__ = '{var:build_name}'
|
|
18
18
|
__build_date__ = '{var:build_date}'
|
|
19
19
|
|
|
@@ -21,4 +21,4 @@ __author__ = 'Jeffery G. Smith'
|
|
|
21
21
|
__email__ = 'web@pobox.com'
|
|
22
22
|
|
|
23
23
|
__license__ = 'MIT'
|
|
24
|
-
__copyright__ = 'Copyright (c)
|
|
24
|
+
__copyright__ = 'Copyright (c) 2025 Jeffery G. Smith'
|
|
@@ -6,7 +6,6 @@ Enables use as module: $ python -m git-stream --version
|
|
|
6
6
|
"""
|
|
7
7
|
|
|
8
8
|
# TODO:
|
|
9
|
-
# Store as a module and install with pip
|
|
10
9
|
# Move config to OS correct location
|
|
11
10
|
# Add to BatCave.cms
|
|
12
11
|
# DATA_CACHE_DIR
|
|
@@ -231,7 +230,9 @@ def create(args: Namespace) -> None:
|
|
|
231
230
|
"""Create a stream."""
|
|
232
231
|
config = _read_config()
|
|
233
232
|
repo = args.repo if args.repo.startswith('git@') else f'{config.default_remote}{args.repo}.git'
|
|
234
|
-
repo_name = repo.split('/')[-1]
|
|
233
|
+
repo_name = repo.split('/')[-1]
|
|
234
|
+
if repo_name.endswith('.git'):
|
|
235
|
+
repo_name = repo_name[:-4]
|
|
235
236
|
stream_branch = f'{config.stream_branch_prefix}{args.name}'
|
|
236
237
|
stream_name = f'{repo_name}-' + stream_branch.replace('/', '-')
|
|
237
238
|
parent = args.parent if args.parent else config.default_parent
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
[build-system]
|
|
2
|
-
requires = ["setuptools >=
|
|
2
|
+
requires = ["setuptools >= 77.0"]
|
|
3
3
|
build-backend = "setuptools.build_meta"
|
|
4
4
|
|
|
5
5
|
[project]
|
|
@@ -7,14 +7,13 @@ name = "git-stream"
|
|
|
7
7
|
description = "Git Stream Implementation"
|
|
8
8
|
authors = [{ name = "Jeffery G. Smith", email = "web@pobox.com" }]
|
|
9
9
|
readme = "DOCUMENTATION.md"
|
|
10
|
-
license =
|
|
10
|
+
license-files = ["LICENSE"]
|
|
11
11
|
dynamic = ["version"]
|
|
12
12
|
|
|
13
13
|
requires-python = "~=3.12"
|
|
14
|
-
keywords = ["
|
|
14
|
+
keywords = ["git", "programming", "utilities"]
|
|
15
15
|
classifiers = [
|
|
16
16
|
"Development Status :: 5 - Production/Stable",
|
|
17
|
-
"License :: OSI Approved :: MIT License",
|
|
18
17
|
|
|
19
18
|
"Operating System :: OS Independent",
|
|
20
19
|
"Programming Language :: Python :: 3.12",
|
|
@@ -27,8 +26,8 @@ classifiers = [
|
|
|
27
26
|
dependencies = ["BatCave"]
|
|
28
27
|
|
|
29
28
|
[project.optional-dependencies]
|
|
30
|
-
dev = ["
|
|
31
|
-
|
|
29
|
+
dev = ["bumpver", "vjer"]
|
|
30
|
+
test = []
|
|
32
31
|
# doc = []
|
|
33
32
|
|
|
34
33
|
[project.scripts]
|
|
@@ -72,17 +71,9 @@ ignore_missing_imports = true
|
|
|
72
71
|
module = "dotmap.*"
|
|
73
72
|
ignore_missing_imports = true
|
|
74
73
|
|
|
75
|
-
[[tool.mypy.overrides]]
|
|
76
|
-
module = "flit.*"
|
|
77
|
-
ignore_missing_imports = true
|
|
78
|
-
|
|
79
|
-
[[tool.mypy.overrides]]
|
|
80
|
-
module = "xmlrunner.*"
|
|
81
|
-
ignore_missing_imports = true
|
|
82
|
-
|
|
83
74
|
[tool.bumpver]
|
|
84
|
-
current_version = "
|
|
85
|
-
version_pattern = "
|
|
75
|
+
current_version = "2.0.2"
|
|
76
|
+
version_pattern = "MAJOR.MINOR.PATCH[PYTAGNUM]"
|
|
86
77
|
commit_message = "bump version {old_version} -> {new_version} [skip ci]"
|
|
87
78
|
commit = true
|
|
88
79
|
tag = false
|
|
@@ -91,4 +82,4 @@ push = true
|
|
|
91
82
|
[tool.bumpver.file_patterns]
|
|
92
83
|
"git_stream/__init__.py" = ["__version__ = '{pep440_version}'"]
|
|
93
84
|
|
|
94
|
-
# cSpell:ignore
|
|
85
|
+
# cSpell:ignore pyproject pytagnum
|
|
@@ -13,13 +13,13 @@ install_requires = \
|
|
|
13
13
|
['BatCave']
|
|
14
14
|
|
|
15
15
|
extras_require = \
|
|
16
|
-
{'dev': ['
|
|
16
|
+
{'dev': ['bumpver', 'vjer']}
|
|
17
17
|
|
|
18
18
|
entry_points = \
|
|
19
19
|
{'console_scripts': ['git-stream = git_stream.__main__:main']}
|
|
20
20
|
|
|
21
21
|
setup(name='git-stream',
|
|
22
|
-
version='2.0.
|
|
22
|
+
version='2.0.2',
|
|
23
23
|
description='Git Stream Implementation',
|
|
24
24
|
author=None,
|
|
25
25
|
author_email='"Jeffery G. Smith" <web@pobox.com>',
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
"""This is the unit test driver module."""
|
|
@@ -0,0 +1,123 @@
|
|
|
1
|
+
import sys
|
|
2
|
+
import os
|
|
3
|
+
import yaml
|
|
4
|
+
import unittest
|
|
5
|
+
import tempfile
|
|
6
|
+
from io import StringIO
|
|
7
|
+
from contextlib import redirect_stdout, redirect_stderr
|
|
8
|
+
from pathlib import Path
|
|
9
|
+
from types import SimpleNamespace
|
|
10
|
+
from dotmap import DotMap
|
|
11
|
+
|
|
12
|
+
# Adjust import path to include project root
|
|
13
|
+
sys.path.insert(0, os.path.abspath(os.path.join(os.path.dirname(__file__), '..')))
|
|
14
|
+
from git_stream import __main__ as main_module
|
|
15
|
+
|
|
16
|
+
class TestMain(unittest.TestCase):
|
|
17
|
+
def setUp(self):
|
|
18
|
+
# Create isolated temp directory and config file
|
|
19
|
+
self.tempdir = tempfile.TemporaryDirectory()
|
|
20
|
+
config_path = Path(self.tempdir.name) / 'config.yml'
|
|
21
|
+
initial = {
|
|
22
|
+
'schema': main_module.CONFIG_SCHEMA,
|
|
23
|
+
'default_parent': 'main',
|
|
24
|
+
'default_remote': 'git@github.com:',
|
|
25
|
+
'default_pr_reviewer': '',
|
|
26
|
+
'delivery_branch_template': '%t_%d',
|
|
27
|
+
'stream_branch_prefix': 'user/',
|
|
28
|
+
'stream_home': str(Path(self.tempdir.name) / 'streams'),
|
|
29
|
+
'streams': {}
|
|
30
|
+
}
|
|
31
|
+
config_path.write_text(yaml.safe_dump(initial))
|
|
32
|
+
main_module.CONFIG = config_path
|
|
33
|
+
|
|
34
|
+
def tearDown(self):
|
|
35
|
+
self.tempdir.cleanup()
|
|
36
|
+
|
|
37
|
+
def test_read_config_mismatch_schema(self):
|
|
38
|
+
# Write invalid schema
|
|
39
|
+
bad_path = Path(self.tempdir.name) / 'bad.yml'
|
|
40
|
+
bad_path.write_text(yaml.safe_dump({'schema': 999}))
|
|
41
|
+
main_module.CONFIG = bad_path
|
|
42
|
+
buf = StringIO()
|
|
43
|
+
# Patch module-level stderr to capture print
|
|
44
|
+
orig_err = main_module.stderr
|
|
45
|
+
main_module.stderr = buf
|
|
46
|
+
try:
|
|
47
|
+
with self.assertRaises(SystemExit):
|
|
48
|
+
main_module._read_config()
|
|
49
|
+
finally:
|
|
50
|
+
main_module.stderr = orig_err
|
|
51
|
+
# Verify the error message contains expected schema
|
|
52
|
+
self.assertIn(f"expected: {main_module.CONFIG_SCHEMA}", buf.getvalue())
|
|
53
|
+
|
|
54
|
+
def test_read_config_success(self):
|
|
55
|
+
cfg = main_module._read_config()
|
|
56
|
+
self.assertIsInstance(cfg, DotMap)
|
|
57
|
+
self.assertEqual(cfg.schema, main_module.CONFIG_SCHEMA)
|
|
58
|
+
|
|
59
|
+
def test_configurator_list(self):
|
|
60
|
+
cfg = main_module._read_config()
|
|
61
|
+
cfg.new_field = 'value'
|
|
62
|
+
main_module._write_config(cfg)
|
|
63
|
+
args = SimpleNamespace(set=None)
|
|
64
|
+
out = StringIO()
|
|
65
|
+
with redirect_stdout(out):
|
|
66
|
+
main_module.configurator(args)
|
|
67
|
+
self.assertIn('new_field: value', out.getvalue())
|
|
68
|
+
|
|
69
|
+
def test_configurator_set(self):
|
|
70
|
+
args = SimpleNamespace(set='default_parent=dev')
|
|
71
|
+
main_module.configurator(args)
|
|
72
|
+
cfg = main_module._read_config()
|
|
73
|
+
self.assertEqual(cfg.default_parent, 'dev')
|
|
74
|
+
|
|
75
|
+
def test_list_streams(self):
|
|
76
|
+
cfg = main_module._read_config()
|
|
77
|
+
cfg.streams['s1'] = {
|
|
78
|
+
'branch': 'b1', 'repo': 'r1', 'description': 'd1',
|
|
79
|
+
'parents': ['main'], 'schema': main_module.STREAM_SCHEMA
|
|
80
|
+
}
|
|
81
|
+
main_module._write_config(cfg)
|
|
82
|
+
out = StringIO()
|
|
83
|
+
with redirect_stdout(out):
|
|
84
|
+
main_module.list_streams()
|
|
85
|
+
output = out.getvalue()
|
|
86
|
+
self.assertIn('name: s1', output)
|
|
87
|
+
self.assertIn('branch: b1', output)
|
|
88
|
+
|
|
89
|
+
def test_rm_stream(self):
|
|
90
|
+
cfg = main_module._read_config()
|
|
91
|
+
cfg.streams['to_remove'] = {
|
|
92
|
+
'branch': 'b', 'repo': 'r', 'description': 'd',
|
|
93
|
+
'parents': ['main'], 'schema': main_module.STREAM_SCHEMA
|
|
94
|
+
}
|
|
95
|
+
cfg.streams['keep'] = {
|
|
96
|
+
'branch': 'b2', 'repo': 'r2', 'description': 'd2',
|
|
97
|
+
'parents': ['main'], 'schema': main_module.STREAM_SCHEMA
|
|
98
|
+
}
|
|
99
|
+
main_module._write_config(cfg)
|
|
100
|
+
args = SimpleNamespace(name='to_remove', cleanup=False)
|
|
101
|
+
main_module.rm_stream(args)
|
|
102
|
+
cfg2 = main_module._read_config()
|
|
103
|
+
self.assertNotIn('to_remove', cfg2.streams)
|
|
104
|
+
self.assertIn('keep', cfg2.streams)
|
|
105
|
+
|
|
106
|
+
def test_stream_action_delegates(self):
|
|
107
|
+
calls = {}
|
|
108
|
+
class Dummy:
|
|
109
|
+
def foo(self, **kwargs):
|
|
110
|
+
calls['called'] = True
|
|
111
|
+
calls['args'] = kwargs
|
|
112
|
+
# Patch Stream to return Dummy instance
|
|
113
|
+
original_stream = main_module.Stream
|
|
114
|
+
main_module.Stream = lambda: Dummy()
|
|
115
|
+
try:
|
|
116
|
+
main_module.stream_action('foo', bar=1)
|
|
117
|
+
finally:
|
|
118
|
+
main_module.Stream = original_stream
|
|
119
|
+
self.assertTrue(calls.get('called', False))
|
|
120
|
+
self.assertEqual(calls.get('args'), {'bar': 1})
|
|
121
|
+
|
|
122
|
+
if __name__ == '__main__':
|
|
123
|
+
unittest.main()
|
|
File without changes
|
|
@@ -14,11 +14,17 @@ test:
|
|
|
14
14
|
- type: mypy
|
|
15
15
|
targets:
|
|
16
16
|
- git_stream
|
|
17
|
+
- type: python_unittest
|
|
17
18
|
build:
|
|
18
19
|
steps:
|
|
19
20
|
- type: setuptools
|
|
20
21
|
release:
|
|
21
22
|
steps:
|
|
23
|
+
- type: pypi
|
|
24
|
+
test_pypi: true
|
|
25
|
+
username: __token__
|
|
26
|
+
password: "{var:PYPI_TOKEN}"
|
|
27
|
+
pre_release_only: true
|
|
22
28
|
- type: bumpver
|
|
23
29
|
- type: setuptools_build
|
|
24
30
|
release_only: true
|
|
@@ -30,5 +36,7 @@ release:
|
|
|
30
36
|
patch: True
|
|
31
37
|
tag: rc
|
|
32
38
|
tag-num: True
|
|
33
|
-
|
|
34
|
-
|
|
39
|
+
- type: pypi
|
|
40
|
+
username: __token__
|
|
41
|
+
password: "{var:PYPI_TOKEN}"
|
|
42
|
+
release_only: true
|
|
@@ -1,141 +0,0 @@
|
|
|
1
|
-
name: Git Stream Build and Release
|
|
2
|
-
run-name: Git Stream Build and Release - ${{ github.run_id }}
|
|
3
|
-
|
|
4
|
-
on:
|
|
5
|
-
workflow_dispatch:
|
|
6
|
-
push:
|
|
7
|
-
branches:
|
|
8
|
-
- main
|
|
9
|
-
- release/*
|
|
10
|
-
- feature/*
|
|
11
|
-
pull_request:
|
|
12
|
-
branches:
|
|
13
|
-
- main
|
|
14
|
-
- release/*
|
|
15
|
-
- feature/*
|
|
16
|
-
|
|
17
|
-
concurrency:
|
|
18
|
-
group: ${{ github.workflow }}-${{ github.ref }}
|
|
19
|
-
cancel-in-progress: true
|
|
20
|
-
|
|
21
|
-
env:
|
|
22
|
-
ARTIFACTS_DIR: artifacts
|
|
23
|
-
GH_TOKEN: ${{ github.token }}
|
|
24
|
-
VJER_ENV: development
|
|
25
|
-
|
|
26
|
-
jobs:
|
|
27
|
-
test:
|
|
28
|
-
uses: arisilon/shared-actions/.github/workflows/vjer.yml@released
|
|
29
|
-
with:
|
|
30
|
-
action: test
|
|
31
|
-
os: ${{ matrix.os }}
|
|
32
|
-
python-version: ${{ matrix.python-version }}
|
|
33
|
-
strategy:
|
|
34
|
-
matrix:
|
|
35
|
-
os:
|
|
36
|
-
- ubuntu-latest
|
|
37
|
-
- macos-latest
|
|
38
|
-
- windows-latest
|
|
39
|
-
python-version:
|
|
40
|
-
- "3.12"
|
|
41
|
-
- "3.13"
|
|
42
|
-
|
|
43
|
-
build:
|
|
44
|
-
needs: test
|
|
45
|
-
uses: arisilon/shared-actions/.github/workflows/vjer.yml@released
|
|
46
|
-
with:
|
|
47
|
-
action: build
|
|
48
|
-
os: ubuntu-latest
|
|
49
|
-
python-version: "3.12"
|
|
50
|
-
use-flit: true
|
|
51
|
-
|
|
52
|
-
install-test:
|
|
53
|
-
needs: build
|
|
54
|
-
uses: arisilon/shared-actions/.github/workflows/install-test.yml@released
|
|
55
|
-
with:
|
|
56
|
-
os: ${{ matrix.os }}
|
|
57
|
-
python-version: ${{ matrix.python-version }}
|
|
58
|
-
test-action: "python -c 'import batcave; print(batcave.__version__)'"
|
|
59
|
-
strategy:
|
|
60
|
-
matrix:
|
|
61
|
-
os:
|
|
62
|
-
- ubuntu-latest
|
|
63
|
-
- macos-latest
|
|
64
|
-
- windows-latest
|
|
65
|
-
python-version:
|
|
66
|
-
- "3.12"
|
|
67
|
-
- "3.13"
|
|
68
|
-
|
|
69
|
-
pre_release:
|
|
70
|
-
needs: install-test
|
|
71
|
-
if: (github.event_name != 'pull_request') && ((github.ref_name == 'main') || startsWith(github.ref_name, 'release/'))
|
|
72
|
-
permissions:
|
|
73
|
-
contents: write
|
|
74
|
-
id-token: write
|
|
75
|
-
runs-on: ubuntu-latest
|
|
76
|
-
environment: pre_release
|
|
77
|
-
steps:
|
|
78
|
-
- name: Checkout source
|
|
79
|
-
uses: actions/checkout@v4
|
|
80
|
-
with:
|
|
81
|
-
token: ${{ secrets.RELEASE_TOKEN }}
|
|
82
|
-
- name: Setup Python 3.12
|
|
83
|
-
uses: actions/setup-python@v5
|
|
84
|
-
with:
|
|
85
|
-
python-version: "3.12"
|
|
86
|
-
cache: "pip"
|
|
87
|
-
- name: Download artifacts
|
|
88
|
-
uses: actions/download-artifact@v4
|
|
89
|
-
- name: Install vjer
|
|
90
|
-
run: pip install vjer
|
|
91
|
-
- name: Prepare Git
|
|
92
|
-
run: |
|
|
93
|
-
git config user.name "${{ github.triggering_actor }}"
|
|
94
|
-
git config user.email "${{ github.triggering_actor }}@users.noreply.github.com"
|
|
95
|
-
git pull
|
|
96
|
-
- name: Publish to Test PyPi
|
|
97
|
-
uses: pypa/gh-action-pypi-publish@v1.12.4
|
|
98
|
-
with:
|
|
99
|
-
repository-url: https://test.pypi.org/legacy/
|
|
100
|
-
packages-dir: ${{ env.ARTIFACTS_DIR }}
|
|
101
|
-
- name: Run post-publish steps
|
|
102
|
-
run: vjer pre_release
|
|
103
|
-
|
|
104
|
-
release:
|
|
105
|
-
needs: pre_release
|
|
106
|
-
if: (github.event_name != 'pull_request') && ((github.ref_name == 'main') || startsWith(github.ref_name, 'release/'))
|
|
107
|
-
permissions:
|
|
108
|
-
contents: write
|
|
109
|
-
id-token: write
|
|
110
|
-
runs-on: ubuntu-latest
|
|
111
|
-
environment: release
|
|
112
|
-
steps:
|
|
113
|
-
- name: Checkout source
|
|
114
|
-
uses: actions/checkout@v4
|
|
115
|
-
with:
|
|
116
|
-
token: ${{ secrets.RELEASE_TOKEN }}
|
|
117
|
-
- name: Setup Python 3.12
|
|
118
|
-
uses: actions/setup-python@v5
|
|
119
|
-
with:
|
|
120
|
-
python-version: "3.12"
|
|
121
|
-
cache: "pip"
|
|
122
|
-
- name: Install vjer
|
|
123
|
-
run: pip install vjer
|
|
124
|
-
- name: Prepare Git
|
|
125
|
-
run: |
|
|
126
|
-
git config user.name "${{ github.triggering_actor }}"
|
|
127
|
-
git config user.email "${{ github.triggering_actor }}@users.noreply.github.com"
|
|
128
|
-
git pull
|
|
129
|
-
- name: Run post-publish steps
|
|
130
|
-
run: vjer release
|
|
131
|
-
- name: Publish to PyPi
|
|
132
|
-
uses: pypa/gh-action-pypi-publish@v1.12.4
|
|
133
|
-
with:
|
|
134
|
-
packages-dir: ${{ env.ARTIFACTS_DIR }}
|
|
135
|
-
- name: Upload released artifacts
|
|
136
|
-
uses: actions/upload-artifact@v4
|
|
137
|
-
with:
|
|
138
|
-
name: ${{ env.ARTIFACTS_DIR }}-released
|
|
139
|
-
path: ${{ env.ARTIFACTS_DIR }}
|
|
140
|
-
|
|
141
|
-
# cSpell:ignore pypa
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|