pullup 0.0.10__tar.gz → 0.0.12__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.
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.5
2
2
  Name: pullup
3
- Version: 0.0.10
3
+ Version: 0.0.12
4
4
  Summary: build, release, and deploy projects
5
5
  Project-URL: Repository, https://github.com/vedicreader/pullup
6
6
  Project-URL: Documentation, https://vedicreader.github.io/pullup
@@ -1,4 +1,4 @@
1
- __version__ = "0.0.10"
1
+ __version__ = "0.0.12"
2
2
 
3
3
  # The names a caller reaches for. The modules stay importable for everything else.
4
4
  from .env import EnvError, EnvStore, venv_env
@@ -89,14 +89,16 @@ class EnvStore:
89
89
  else _call(env_get, key, path=self.path))
90
90
  return stored or os.environ.get(key) or ''
91
91
  def set(self, key, value, secret=True):
92
- "Store one value: a secret in the keychain and the env file, anything else in the env file only."
92
+ "Store one value: a secret where dockeasy keeps secrets, anything else in the env file. Say where a secret went."
93
93
  key = str(key or '').strip()
94
94
  if not key: raise EnvError('a key is required')
95
95
  if not str(value): raise EnvError(f'{key} needs a value')
96
96
  env_get, env_set, secret_get, secret_set = _dockeasy()
97
- if secret: _call(secret_set, key, str(value), service=self.service, path=self.path)
98
- else: _call(env_set, key, str(value), path=self.path)
99
- return {'key': key, 'secret': bool(secret)}
97
+ if not secret:
98
+ _call(env_set, key, str(value), path=self.path)
99
+ return {'key': key, 'secret': False}
100
+ went = _call(secret_set, key, str(value), service=self.service, path=self.path)
101
+ return {'key': key, 'secret': True, **(went if isinstance(went, dict) else {})}
100
102
  def unset(self, key):
101
103
  "Remove a value from the keychain, the env file and `os.environ`, and say which of the first two held it."
102
104
  from dockeasy.core import FASTOPS_ENV
@@ -431,7 +431,7 @@ def _gh_authed():
431
431
  if not which('gh'): return False
432
432
  import subprocess
433
433
  try:
434
- return subprocess.run(['gh', 'auth', 'status'], capture_output=True, timeout=8).returncode == 0
434
+ return subprocess.run(['gh', 'auth', 'status'], capture_output=True, timeout=8, stdin=subprocess.DEVNULL).returncode == 0
435
435
  except (OSError, subprocess.SubprocessError): return False
436
436
 
437
437
  # %% ../nbs/05_workflows.ipynb #c1e903a5
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