itw-python-builder 0.1.34__tar.gz → 0.1.37__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.
- {itw_python_builder-0.1.34 → itw_python_builder-0.1.37}/PKG-INFO +1 -1
- {itw_python_builder-0.1.34 → itw_python_builder-0.1.37}/itw_python_builder/tasks.py +25 -2
- {itw_python_builder-0.1.34 → itw_python_builder-0.1.37}/itw_python_builder.egg-info/PKG-INFO +1 -1
- {itw_python_builder-0.1.34 → itw_python_builder-0.1.37}/pyproject.toml +1 -1
- {itw_python_builder-0.1.34 → itw_python_builder-0.1.37}/LICENSE +0 -0
- {itw_python_builder-0.1.34 → itw_python_builder-0.1.37}/README.md +0 -0
- {itw_python_builder-0.1.34 → itw_python_builder-0.1.37}/itw_python_builder/.pylintrc +0 -0
- {itw_python_builder-0.1.34 → itw_python_builder-0.1.37}/itw_python_builder/__init__.py +0 -0
- {itw_python_builder-0.1.34 → itw_python_builder-0.1.37}/itw_python_builder/cli.py +0 -0
- {itw_python_builder-0.1.34 → itw_python_builder-0.1.37}/itw_python_builder/ssr_tasks.py +0 -0
- {itw_python_builder-0.1.34 → itw_python_builder-0.1.37}/itw_python_builder/templates/server.sitemap.snippet.ts +0 -0
- {itw_python_builder-0.1.34 → itw_python_builder-0.1.37}/itw_python_builder/templates/sitemap.routes.ts +0 -0
- {itw_python_builder-0.1.34 → itw_python_builder-0.1.37}/itw_python_builder/utils.py +0 -0
- {itw_python_builder-0.1.34 → itw_python_builder-0.1.37}/itw_python_builder/version.py +0 -0
- {itw_python_builder-0.1.34 → itw_python_builder-0.1.37}/itw_python_builder.egg-info/SOURCES.txt +0 -0
- {itw_python_builder-0.1.34 → itw_python_builder-0.1.37}/itw_python_builder.egg-info/dependency_links.txt +0 -0
- {itw_python_builder-0.1.34 → itw_python_builder-0.1.37}/itw_python_builder.egg-info/entry_points.txt +0 -0
- {itw_python_builder-0.1.34 → itw_python_builder-0.1.37}/itw_python_builder.egg-info/requires.txt +0 -0
- {itw_python_builder-0.1.34 → itw_python_builder-0.1.37}/itw_python_builder.egg-info/top_level.txt +0 -0
- {itw_python_builder-0.1.34 → itw_python_builder-0.1.37}/setup.cfg +0 -0
|
@@ -61,9 +61,18 @@ def build_frontend(ctx: Context, branch: str, ssr: bool = False) -> None:
|
|
|
61
61
|
|
|
62
62
|
def package_dist(ctx: Context) -> None:
|
|
63
63
|
"""Tar the dist/ output directory into dist.tar.gz."""
|
|
64
|
-
|
|
64
|
+
dist_dir = os.path.join(os.getcwd(), 'dist')
|
|
65
|
+
if not os.path.isdir(dist_dir):
|
|
65
66
|
raise RuntimeError('No dist/ directory found after build — did `ng build` succeed?')
|
|
66
|
-
|
|
67
|
+
|
|
68
|
+
target_dir = dist_dir
|
|
69
|
+
if not is_ssr_project():
|
|
70
|
+
for root, dirs, files in os.walk(dist_dir):
|
|
71
|
+
if 'index.html' in files:
|
|
72
|
+
target_dir = root
|
|
73
|
+
break
|
|
74
|
+
|
|
75
|
+
ctx.run(f'tar -czf dist.tar.gz -C "{target_dir}" .')
|
|
67
76
|
|
|
68
77
|
|
|
69
78
|
_GITLAB_API_HOST_MAP = {
|
|
@@ -150,6 +159,15 @@ def taginit(ctx: Context) -> None:
|
|
|
150
159
|
save_version(version)
|
|
151
160
|
|
|
152
161
|
|
|
162
|
+
def _ensure_unique_tag(ctx: Context, version: Version) -> None:
|
|
163
|
+
"""If the tag already exists, auto-increment RC if it's an RC, or abort if it's a release."""
|
|
164
|
+
while ctx.run(f'git rev-parse -q --verify "refs/tags/{version}"', warn=True, hide=True).ok:
|
|
165
|
+
if version.release_candidate == 0:
|
|
166
|
+
raise RuntimeError(f"Tag {version} already exists! Aborting before pipeline to prevent overwrite.")
|
|
167
|
+
print(f"[itw] Tag {version} already exists, auto-incrementing release candidate...")
|
|
168
|
+
version.increment_release_candidate()
|
|
169
|
+
|
|
170
|
+
|
|
153
171
|
@task
|
|
154
172
|
def incrementrc(ctx: Context, skip_pipeline=False, pylintrc=None, ssr=False) -> None:
|
|
155
173
|
"""Increment release candidate version and deploy. Use --ssr for Angular SSR builds."""
|
|
@@ -158,6 +176,7 @@ def incrementrc(ctx: Context, skip_pipeline=False, pylintrc=None, ssr=False) ->
|
|
|
158
176
|
project_type = detect_project_type()
|
|
159
177
|
version = read_version(ctx)
|
|
160
178
|
version.increment_release_candidate()
|
|
179
|
+
_ensure_unique_tag(ctx, version)
|
|
161
180
|
if project_type == 'backend':
|
|
162
181
|
lint(ctx, pylintrc=pylintrc)
|
|
163
182
|
tag_build_push(ctx, version, skip_pipeline, ssr=ssr)
|
|
@@ -172,6 +191,7 @@ def incrementpatch(ctx: Context, skip_pipeline=False, ssr=False) -> None:
|
|
|
172
191
|
production = check_branch(ctx)
|
|
173
192
|
version = read_version(ctx)
|
|
174
193
|
version.increment_patch(release=production)
|
|
194
|
+
_ensure_unique_tag(ctx, version)
|
|
175
195
|
tag_build_push(ctx, version, skip_pipeline, ssr=ssr)
|
|
176
196
|
save_version(version)
|
|
177
197
|
commit_version(ctx, version)
|
|
@@ -184,6 +204,7 @@ def incrementminor(ctx: Context, skip_pipeline=False, ssr=False) -> None:
|
|
|
184
204
|
production = check_branch(ctx)
|
|
185
205
|
version = read_version(ctx)
|
|
186
206
|
version.increment_minor(release=production)
|
|
207
|
+
_ensure_unique_tag(ctx, version)
|
|
187
208
|
tag_build_push(ctx, version, skip_pipeline, ssr=ssr)
|
|
188
209
|
save_version(version)
|
|
189
210
|
commit_version(ctx, version)
|
|
@@ -196,6 +217,7 @@ def incrementmajor(ctx: Context, skip_pipeline=False, ssr=False) -> None:
|
|
|
196
217
|
production = check_branch(ctx)
|
|
197
218
|
version = read_version(ctx)
|
|
198
219
|
version.increment_major(release=production)
|
|
220
|
+
_ensure_unique_tag(ctx, version)
|
|
199
221
|
tag_build_push(ctx, version, skip_pipeline, ssr=ssr)
|
|
200
222
|
save_version(version)
|
|
201
223
|
commit_version(ctx, version)
|
|
@@ -209,6 +231,7 @@ def release(ctx: Context, skip_pipeline=False, ssr=False) -> None:
|
|
|
209
231
|
login(ctx)
|
|
210
232
|
version = read_version(ctx)
|
|
211
233
|
version.reset_release_candidate(release=True)
|
|
234
|
+
_ensure_unique_tag(ctx, version)
|
|
212
235
|
tag_build_push(ctx, version, skip_pipeline, ssr=ssr)
|
|
213
236
|
save_version(version)
|
|
214
237
|
commit_version(ctx, version)
|
|
@@ -4,7 +4,7 @@ build-backend = "setuptools.build_meta"
|
|
|
4
4
|
|
|
5
5
|
[project]
|
|
6
6
|
name = "itw_python_builder"
|
|
7
|
-
version = "0.1.
|
|
7
|
+
version = "0.1.37"
|
|
8
8
|
description = "Standardized Django deployment pipeline with Docker, testing, and SonarQube integration"
|
|
9
9
|
readme = "README.md"
|
|
10
10
|
requires-python = ">=3.10"
|
|
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
|
{itw_python_builder-0.1.34 → itw_python_builder-0.1.37}/itw_python_builder.egg-info/SOURCES.txt
RENAMED
|
File without changes
|
|
File without changes
|
{itw_python_builder-0.1.34 → itw_python_builder-0.1.37}/itw_python_builder.egg-info/entry_points.txt
RENAMED
|
File without changes
|
{itw_python_builder-0.1.34 → itw_python_builder-0.1.37}/itw_python_builder.egg-info/requires.txt
RENAMED
|
File without changes
|
{itw_python_builder-0.1.34 → itw_python_builder-0.1.37}/itw_python_builder.egg-info/top_level.txt
RENAMED
|
File without changes
|
|
File without changes
|