mirror of
https://github.com/ryanvolz/radioconda.git
synced 2025-08-18 05:02:27 -04:00
Add "-v"/"--version" argument to set the installer version string.
This commit is contained in:
parent
7b0aafca98
commit
8cf14767a8
18
rerender.py
18
rerender.py
@ -136,6 +136,9 @@ if __name__ == "__main__":
|
|||||||
distname = os.getenv("DISTNAME", "radioconda")
|
distname = os.getenv("DISTNAME", "radioconda")
|
||||||
source = os.getenv("SOURCE", "github.com/ryanvolz/radioconda")
|
source = os.getenv("SOURCE", "github.com/ryanvolz/radioconda")
|
||||||
|
|
||||||
|
dt = datetime.datetime.now()
|
||||||
|
version = dt.strftime("%Y.%m.%d")
|
||||||
|
|
||||||
parser = argparse.ArgumentParser(
|
parser = argparse.ArgumentParser(
|
||||||
description=(
|
description=(
|
||||||
"Re-render installer specification directories to be used by conda"
|
"Re-render installer specification directories to be used by conda"
|
||||||
@ -153,6 +156,16 @@ if __name__ == "__main__":
|
|||||||
" (default: %(default)s)"
|
" (default: %(default)s)"
|
||||||
),
|
),
|
||||||
)
|
)
|
||||||
|
parser.add_argument(
|
||||||
|
"-v",
|
||||||
|
"--version",
|
||||||
|
type=str,
|
||||||
|
default=version,
|
||||||
|
help=(
|
||||||
|
"Version tag for the installer, defaults to the current date."
|
||||||
|
" (default: %(default)s)"
|
||||||
|
),
|
||||||
|
)
|
||||||
parser.add_argument(
|
parser.add_argument(
|
||||||
"--company",
|
"--company",
|
||||||
type=str,
|
type=str,
|
||||||
@ -198,12 +211,9 @@ if __name__ == "__main__":
|
|||||||
conda_executable=args.conda_exe, mamba=True, micromamba=True
|
conda_executable=args.conda_exe, mamba=True, micromamba=True
|
||||||
)
|
)
|
||||||
|
|
||||||
dt = datetime.datetime.now()
|
|
||||||
version = dt.strftime("%Y.%m.%d")
|
|
||||||
|
|
||||||
constructor_specs = render_constructor_specs(
|
constructor_specs = render_constructor_specs(
|
||||||
environment_file=args.environment_file,
|
environment_file=args.environment_file,
|
||||||
version=version,
|
version=args.version,
|
||||||
company=args.company,
|
company=args.company,
|
||||||
license_file=args.license_file,
|
license_file=args.license_file,
|
||||||
output_dir=args.output_dir,
|
output_dir=args.output_dir,
|
||||||
|
Loading…
x
Reference in New Issue
Block a user