Skip to content

Commit

Permalink
feat: Add publish script for building/publishing container images SQUASH
Browse files Browse the repository at this point in the history
  • Loading branch information
joshuacurtiss committed Feb 25, 2025
1 parent c094cd6 commit cbf94aa
Showing 1 changed file with 14 additions and 0 deletions.
14 changes: 14 additions & 0 deletions shared/bin/publish.sh
Original file line number Diff line number Diff line change
Expand Up @@ -87,6 +87,20 @@ while getopts hva:n:o:r:-: OPT; do
done
shift $((OPTIND - 1))

# Check dependencies, and abort if any are missing
for c in docker jq; do
if ! which "$c" &>/dev/null; then
echo "${red}The $ul$c$rmul command is required by this script. Aborting.$norm" >&2
exit 1
fi
done

# Only run if "docker" is answering as Docker, not something else like podman
if [[ $(docker --version) != Docker* ]]; then
echo "${red}This script will only build with ${ul}Docker$rmul. Aborting.$norm" >&2
exit 1
fi

# Repo package info
name=$(jq -r '.name' "$context/package.json" | tr -d ' ')
ver=$(jq -r '.version' "$context/package.json")
Expand Down

0 comments on commit cbf94aa

Please sign in to comment.