itw-python-builder 0.1.41__tar.gz → 0.1.42__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 (22) hide show
  1. {itw_python_builder-0.1.41 → itw_python_builder-0.1.42}/PKG-INFO +1 -1
  2. {itw_python_builder-0.1.41 → itw_python_builder-0.1.42}/itw_python_builder/tasks.py +17 -0
  3. {itw_python_builder-0.1.41 → itw_python_builder-0.1.42}/itw_python_builder.egg-info/PKG-INFO +1 -1
  4. {itw_python_builder-0.1.41 → itw_python_builder-0.1.42}/pyproject.toml +1 -1
  5. {itw_python_builder-0.1.41 → itw_python_builder-0.1.42}/LICENSE +0 -0
  6. {itw_python_builder-0.1.41 → itw_python_builder-0.1.42}/README.md +0 -0
  7. {itw_python_builder-0.1.41 → itw_python_builder-0.1.42}/itw_python_builder/.pylintrc +0 -0
  8. {itw_python_builder-0.1.41 → itw_python_builder-0.1.42}/itw_python_builder/__init__.py +0 -0
  9. {itw_python_builder-0.1.41 → itw_python_builder-0.1.42}/itw_python_builder/cli.py +0 -0
  10. {itw_python_builder-0.1.41 → itw_python_builder-0.1.42}/itw_python_builder/notify.py +0 -0
  11. {itw_python_builder-0.1.41 → itw_python_builder-0.1.42}/itw_python_builder/ssr_tasks.py +0 -0
  12. {itw_python_builder-0.1.41 → itw_python_builder-0.1.42}/itw_python_builder/templates/new_version_email.html +0 -0
  13. {itw_python_builder-0.1.41 → itw_python_builder-0.1.42}/itw_python_builder/templates/server.sitemap.snippet.ts +0 -0
  14. {itw_python_builder-0.1.41 → itw_python_builder-0.1.42}/itw_python_builder/templates/sitemap.routes.ts +0 -0
  15. {itw_python_builder-0.1.41 → itw_python_builder-0.1.42}/itw_python_builder/utils.py +0 -0
  16. {itw_python_builder-0.1.41 → itw_python_builder-0.1.42}/itw_python_builder/version.py +0 -0
  17. {itw_python_builder-0.1.41 → itw_python_builder-0.1.42}/itw_python_builder.egg-info/SOURCES.txt +0 -0
  18. {itw_python_builder-0.1.41 → itw_python_builder-0.1.42}/itw_python_builder.egg-info/dependency_links.txt +0 -0
  19. {itw_python_builder-0.1.41 → itw_python_builder-0.1.42}/itw_python_builder.egg-info/entry_points.txt +0 -0
  20. {itw_python_builder-0.1.41 → itw_python_builder-0.1.42}/itw_python_builder.egg-info/requires.txt +0 -0
  21. {itw_python_builder-0.1.41 → itw_python_builder-0.1.42}/itw_python_builder.egg-info/top_level.txt +0 -0
  22. {itw_python_builder-0.1.41 → itw_python_builder-0.1.42}/setup.cfg +0 -0
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.4
2
2
  Name: itw_python_builder
3
- Version: 0.1.41
3
+ Version: 0.1.42
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
@@ -21,6 +21,7 @@ from itw_python_builder.utils import (
21
21
  load_cached_token,
22
22
  save_token_to_cache,
23
23
  probe_gitlab_token,
24
+ TOKEN_CACHE_PATH,
24
25
  )
25
26
  from itw_python_builder.ssr_tasks import * # noqa: F401,F403 — exposes ssr-init
26
27
 
@@ -91,6 +92,22 @@ def login(ctx: Context, username=None):
91
92
  _prompt_and_store_token(ctx, username)
92
93
 
93
94
 
95
+ @task
96
+ def logout(ctx: Context):
97
+ """Forget the cached GitLab token and log out of the container registry."""
98
+ try:
99
+ TOKEN_CACHE_PATH.unlink()
100
+ print(f'[itw] Removed cached token at {TOKEN_CACHE_PATH}.')
101
+ except FileNotFoundError:
102
+ print('[itw] No cached token to remove.')
103
+ except OSError as exc:
104
+ print(f'[itw] Could not remove {TOKEN_CACHE_PATH}: {exc}')
105
+ if detect_project_type() == 'backend':
106
+ ctx.run('podman logout gitreg.it-works.io:443', warn=True)
107
+ os.environ.pop('GITLAB_TOKEN', None)
108
+ os.environ.pop('GITLAB_USERNAME', None)
109
+
110
+
94
111
  def build_frontend(ctx: Context, branch: str, ssr: bool = False) -> None:
95
112
  """Build the Angular app. With ssr=True uses the SSR npm scripts."""
96
113
  if ssr:
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.4
2
2
  Name: itw_python_builder
3
- Version: 0.1.41
3
+ Version: 0.1.42
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.41"
7
+ version = "0.1.42"
8
8
  description = "Standardized Django deployment pipeline with Docker, testing, and SonarQube integration"
9
9
  readme = "README.md"
10
10
  requires-python = ">=3.10"