Skip to content

Commit

Permalink
0.1.4 add history alias
Browse files Browse the repository at this point in the history
  • Loading branch information
JoshuaSchlichting committed Aug 30, 2024
1 parent 43c6d14 commit f8862e5
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 1 deletion.
1 change: 1 addition & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -19,6 +19,7 @@ Commands:
clean: Stop and remove the container and image
install: Install this script to /usr/local/bin/jo.sh and create a josh symlink (may require sudo)
uninstall: Uninstall this script from /usr/local/bin/jo.sh (may require sudo)
history: Show the history of the container image (alias for 'docker history --format {{.CreatedBy}} $(pwd) --no-trunc)'
help: Show this help message
Options:
--version, -v: Show the version of jo.sh
Expand Down
5 changes: 4 additions & 1 deletion jo.sh
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
#!/usr/bin/env bash
JOSH_VERSION=0.1.3
JOSH_VERSION=0.1.4
if [[ "$1" = "--version" || "$1" = "-v" ]]; then
echo $JOSH_VERSION
exit 0
Expand Down Expand Up @@ -253,6 +253,8 @@ elif [ "$1" = "clean" ]; then
docker container rm $CONTAINER_NAME || true
docker image rm $CONTAINER_NAME || true
echo Clean up complete.
elif [ "$1" = "history" ]; then
docker history --format "{{.CreatedBy}}" $CONTAINER_NAME --no-trunc
elif [[ "$1" == *.sh ]]; then
docker run \
-it \
Expand Down Expand Up @@ -288,6 +290,7 @@ elif [[ "$1" == *help ]]; then
echo " clean: Stop and remove the container and image"
echo " install: Install this script to /usr/local/bin/jo.sh and create a "josh" symlink (may require sudo)"
echo " uninstall: Uninstall this script from /usr/local/bin/jo.sh (may require sudo)"
echo " history: Show the history of the container image (alias for 'docker history --format "{{.CreatedBy}}" \$(pwd) --no-trunc)'"
echo " help: Show this help message"
echo "Options:"
echo " --version, -v: Show the version of jo.sh"
Expand Down

0 comments on commit f8862e5

Please sign in to comment.