itw-python-builder 0.1.33__tar.gz → 0.1.36__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.
Files changed (20) hide show
  1. {itw_python_builder-0.1.33 → itw_python_builder-0.1.36}/PKG-INFO +1 -1
  2. {itw_python_builder-0.1.33 → itw_python_builder-0.1.36}/itw_python_builder/tasks.py +14 -5
  3. {itw_python_builder-0.1.33 → itw_python_builder-0.1.36}/itw_python_builder.egg-info/PKG-INFO +1 -1
  4. {itw_python_builder-0.1.33 → itw_python_builder-0.1.36}/pyproject.toml +1 -1
  5. {itw_python_builder-0.1.33 → itw_python_builder-0.1.36}/LICENSE +0 -0
  6. {itw_python_builder-0.1.33 → itw_python_builder-0.1.36}/README.md +0 -0
  7. {itw_python_builder-0.1.33 → itw_python_builder-0.1.36}/itw_python_builder/.pylintrc +0 -0
  8. {itw_python_builder-0.1.33 → itw_python_builder-0.1.36}/itw_python_builder/__init__.py +0 -0
  9. {itw_python_builder-0.1.33 → itw_python_builder-0.1.36}/itw_python_builder/cli.py +0 -0
  10. {itw_python_builder-0.1.33 → itw_python_builder-0.1.36}/itw_python_builder/ssr_tasks.py +0 -0
  11. {itw_python_builder-0.1.33 → itw_python_builder-0.1.36}/itw_python_builder/templates/server.sitemap.snippet.ts +0 -0
  12. {itw_python_builder-0.1.33 → itw_python_builder-0.1.36}/itw_python_builder/templates/sitemap.routes.ts +0 -0
  13. {itw_python_builder-0.1.33 → itw_python_builder-0.1.36}/itw_python_builder/utils.py +0 -0
  14. {itw_python_builder-0.1.33 → itw_python_builder-0.1.36}/itw_python_builder/version.py +0 -0
  15. {itw_python_builder-0.1.33 → itw_python_builder-0.1.36}/itw_python_builder.egg-info/SOURCES.txt +0 -0
  16. {itw_python_builder-0.1.33 → itw_python_builder-0.1.36}/itw_python_builder.egg-info/dependency_links.txt +0 -0
  17. {itw_python_builder-0.1.33 → itw_python_builder-0.1.36}/itw_python_builder.egg-info/entry_points.txt +0 -0
  18. {itw_python_builder-0.1.33 → itw_python_builder-0.1.36}/itw_python_builder.egg-info/requires.txt +0 -0
  19. {itw_python_builder-0.1.33 → itw_python_builder-0.1.36}/itw_python_builder.egg-info/top_level.txt +0 -0
  20. {itw_python_builder-0.1.33 → itw_python_builder-0.1.36}/setup.cfg +0 -0
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.4
2
2
  Name: itw_python_builder
3
- Version: 0.1.33
3
+ Version: 0.1.36
4
4
  Summary: Standardized Django deployment pipeline with Docker, testing, and SonarQube integration
5
5
  Author-email: IT-Works <contact@it-works.io>
6
6
  License: MIT
@@ -52,18 +52,27 @@ def build_frontend(ctx: Context, branch: str, ssr: bool = False) -> None:
52
52
  'Passed --ssr but project is not SSR-scaffolded '
53
53
  '(missing server.ts / tsconfig.server.json). Run `itw ssr-init` first.'
54
54
  )
55
- script = 'build:ssr' if branch == 'master' else 'build:ssr:staging'
55
+ script = 'build-ssr-master' if branch == 'master' else 'build-ssr-staging'
56
56
  ctx.run(f'npm run {script}')
57
57
  return
58
- config = 'production' if branch == 'master' else 'staging'
59
- ctx.run(f'npx ng build --configuration={config}')
58
+ script = 'build-master' if branch == 'master' else 'build-staging'
59
+ ctx.run(f'npm run {script}')
60
60
 
61
61
 
62
62
  def package_dist(ctx: Context) -> None:
63
63
  """Tar the dist/ output directory into dist.tar.gz."""
64
- if not os.path.isdir(os.path.join(os.getcwd(), 'dist')):
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
- ctx.run('tar -czf dist.tar.gz -C dist .')
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 = {
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.4
2
2
  Name: itw_python_builder
3
- Version: 0.1.33
3
+ Version: 0.1.36
4
4
  Summary: Standardized Django deployment pipeline with Docker, testing, and SonarQube integration
5
5
  Author-email: IT-Works <contact@it-works.io>
6
6
  License: MIT
@@ -4,7 +4,7 @@ build-backend = "setuptools.build_meta"
4
4
 
5
5
  [project]
6
6
  name = "itw_python_builder"
7
- version = "0.1.33"
7
+ version = "0.1.36"
8
8
  description = "Standardized Django deployment pipeline with Docker, testing, and SonarQube integration"
9
9
  readme = "README.md"
10
10
  requires-python = ">=3.10"