Skip to content

Commit

Permalink
fix: rename esi-shell option --version to --tag (#99)
Browse files Browse the repository at this point in the history
  • Loading branch information
plexoos committed Jul 10, 2024
1 parent 721aff4 commit 70623b9
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 8 deletions.
2 changes: 1 addition & 1 deletion .github/workflows/build-pull-request.yml
Original file line number Diff line number Diff line change
Expand Up @@ -56,4 +56,4 @@ jobs:
- name: Test esi-shell
run: |
./esi-shell -v ${{ env.TAG }} "opticks-full-prepare && opticks-t"
./esi-shell -t ${{ env.TAG }} "opticks-full-prepare && opticks-t"
13 changes: 6 additions & 7 deletions esi-shell
Original file line number Diff line number Diff line change
Expand Up @@ -27,8 +27,7 @@ REQUIRED_DOCKER_VERSION=23.0.0

# set default values
IMAGE_NAME="ghcr.io/bnlnpps/esi-shell"
DEFAULT_VERSION="latest"
VERSION=$DEFAULT_VERSION
IMAGE_TAG="latest"
ESI_SHELL_VERSION=
CONTAINER_COMMAND=
CONTAINER_OPTIONS=
Expand All @@ -40,8 +39,8 @@ usage() {
echo " ./esi-shell [OPTIONS] [COMMAND] [-- CONTAINER_OPTIONS]"
echo ""
echo "OPTIONS:"
echo " -v, --version Specific esi-shell version to use (Default: $DEFAULT_VERSION)"
echo " -h, --help Print this message"
echo " -t, --tag Specific esi-shell tag to use (Default: $IMAGE_TAG)"
echo ""
echo "COMMAND is a command to execute in the container, leave it empty for interactive shell. For example:"
echo " pwd"
Expand All @@ -55,7 +54,7 @@ usage() {
echo ""
echo "EXAMPLES:"
echo " - Start an interactive shell: ./esi-shell"
echo " - Use specific version: ./esi-shell -v 0.1.0"
echo " - Use specific tag: ./esi-shell -t 0.1.0"
echo " - Execute a single command: ./esi-shell echo \$OPTIX_DIR"
echo " - Configure remote image: ./esi-shell -- --pull=always -e HOME=\$HOME"
echo ""
Expand Down Expand Up @@ -103,8 +102,8 @@ warn() {
while [[ $# -gt 0 ]]
do
case $1 in
-v | --version)
VERSION=${2:-$DEFAULT_VERSION}
-t | --tag)
IMAGE_TAG=${2:-$IMAGE_TAG}
shift
shift
;;
Expand Down Expand Up @@ -279,7 +278,7 @@ fi
USABLE_SINGULARITY="$(find_tool singularity)"
USABLE_DOCKER="$(find_tool docker)"
IMG=${IMAGE_NAME}:${VERSION}
IMG=${IMAGE_NAME}:${IMAGE_TAG}
ohai "Using esi-shell image: ${IMG}"
if [[ -n "${USABLE_DOCKER-}" ]]
Expand Down

0 comments on commit 70623b9

Please sign in to comment.