prompt for gopass only if certain environment is set

This commit is contained in:
ansgarz 2024-02-01 22:53:24 +01:00
parent 32ae618fd6
commit b08e201a03

View file

@ -10,14 +10,22 @@ PROJECT_ROOT_PATH = "."
version = "1.9.2-dev"
@init(environments=["na"])
def initialize1(project):
@init
def initialize0(project):
"""
to avoid prompt for gopass if no artifacts need to be uploaded
usage: with option "-E ng" , e.g. "pyb -E na patch_local"
usage: with option "-E ng" , e.g. "pyb -E artifacts patch_local"
"""
os.environ["RELEASE_ARTIFACT_TOKEN"] = "dummy" # avoids prompt for RELEASE_ARTIFACT_TOKEN
@init(environments=["artifacts"])
def initialize1(project):
"""
prompt for gopass if no artifacts need to be uploaded
usage: with option "-E artifacts" , e.g. "pyb -E artifacts patch_local"
"""
del os.environ["RELEASE_ARTIFACT_TOKEN"]
@init
def initialize2(project):