Skip to content

Instantly share code, notes, and snippets.

@jps3
Created April 12, 2024 16:24
Show Gist options
  • Save jps3/c7ce04dd22b6886ee67ac18db50842e1 to your computer and use it in GitHub Desktop.
Save jps3/c7ce04dd22b6886ee67ac18db50842e1 to your computer and use it in GitHub Desktop.
#!/bin/zsh -eux
VERSION="$1" # ex. 24.002.20687
VERSION="${VERSION:gs/\./}" # ex. 2400220687
JAMF_UPLOAD_REPO="$HOME/src/github.com/grahampugh/jamf-upload"
JAMF_UPLOAD="${JAMF_UPLOAD_REPO}/jamf-upload.sh"
AUTOPKG_PREFS="$HOME/Library/Preferences/com.github.autopkg.plist"
test -n "${VIRTUAL_ENV}"
ls -1 Acro*${VERSION}*.pkg \
| while read -r PKG; do
"$JAMF_UPLOAD" pkg --prefs "$AUTOPKG_PREFS" --pkg "$PKG" --category Applications -v ;
done
#
# ┏━┓┏━┓┏━┓╻ ╻┏┳┓┏━┓╺┳╸╻┏━┓┏┓╻┏━┓
# ┣━┫┗━┓┗━┓┃ ┃┃┃┃┣━┛ ┃ ┃┃ ┃┃┗┫┗━┓
# ╹ ╹┗━┛┗━┛┗━┛╹ ╹╹ ╹ ╹┗━┛╹ ╹┗━┛
#
# - You have the 'jamf-upload' repo https://github.com/grahampugh/jamf-upload
# - You have an appropriate python venv configured
# - You have _activated_ that venv
# - You are using Jamf Pro
# - You have api access configured appropriately in the AUTOPKG_PREFS plist
#
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment