Skip to content

Commit 275b804

Browse files
Matthias WittgenMatthias Wittgen
Matthias Wittgen
authored and
Matthias Wittgen
committed
Add flag to install a specific rubin-env
1 parent 6471fd6 commit 275b804

File tree

1 file changed

+8
-4
lines changed

1 file changed

+8
-4
lines changed

bin/deploy

+8-4
Original file line numberDiff line numberDiff line change
@@ -22,7 +22,7 @@ LSST_LFS_VERSION=${LSST_LFS_VERSION:-2.4.2}
2222
LSST_BUILD_GITREV=${LSST_BUILD_GITREV:-main}
2323
LSST_BUILD_GITREPO=${LSST_BUILD_GITREPO:-https://github.com/lsst/lsst_build.git}
2424
LSST_SCIPIPECENV_GITREPO=${LSST_SCIPIPECENV_GITREPO:-https://github.com/lsst/scipipe_conda_env.git}
25-
25+
LSST_RUBIN_ENV_NAME="rubin-env"
2626
set -e
2727

2828

@@ -34,13 +34,14 @@ usage() {
3434
# note that heredocs are prefixed with tab chars
3535
fail "$(cat <<-EOF
3636
37-
Usage: $0 [-h] [-r REF|-v VERSION|-x TAG]
37+
Usage: $0 [-h] [-r REF|-v VERSION|-x TAG] [-e ENV]
3838
3939
Specific options:
4040
-v VERSION a specific version of rubin-env conda package.
4141
By default will use the version specified in etc/settings.cfg.sh
4242
-r REF git reference (SHA1) in scipipe_conda_env repository (backward compatibility)
4343
-x TAG eups tag to select the exact environment for that tag
44+
-e ENV install a specific environment, like rubin-env-developer
4445
-h show this message
4546
4647
EOF
@@ -54,11 +55,14 @@ parse_args() {
5455

5556
# We are intentionally not using gnu `getopt` due to portability concerns.
5657
# Sadly, this means no long options without a massive amount of boilerplate.
57-
while getopts "hr:v:x:" opt; do
58+
while getopts "hr:v:x:e:" opt; do
5859
case "$opt" in
5960
h)
6061
usage
6162
;;
63+
e)
64+
LSST_RUBIN_ENV_NAME=${OPTARG}
65+
;;
6266
v)
6367
[[ -n $TAG ]] && usage "Cannot specify both -v and -x"
6468
[[ -n $ENVREF ]] && usage "Cannot specify both -v and -r"
@@ -225,7 +229,7 @@ main() {
225229
if [[ -n $TAG ]]; then
226230
ARGS+=("--file" "${TAG}.env")
227231
else
228-
ARGS+=("rubin-env=${RUBIN_ENV_VERSION}")
232+
ARGS+=("${LSST_RUBIN_ENV_NAME}=${RUBIN_ENV_VERSION}")
229233
fi
230234
echo "mamba" "${ARGS[@]}"
231235
mamba "${ARGS[@]}"

0 commit comments

Comments
 (0)