Compare commits
No commits in common. "3e760d5ce33faa59047d3a5267065b649ec3e50d" and "e2a45d9d302b9e8b192b0deb1c76d664f0538f16" have entirely different histories.
3e760d5ce3
...
e2a45d9d30
@ -1,11 +0,0 @@
|
|||||||
cask "promise-utility" do
|
|
||||||
version "4.06.0000.01"
|
|
||||||
sha256 "4c64abd8f434f669bb43c7a31726f64da12394cd4f5857142886bf5ba477340c"
|
|
||||||
|
|
||||||
url "https://dl.breadone.xyz/cask/Promise-Utility-4.06.0000.01.zip"
|
|
||||||
name "Promise Utility"
|
|
||||||
desc "Manage Promise Pegasus devices"
|
|
||||||
homepage "https://promise.com"
|
|
||||||
|
|
||||||
app "Promise Utility.app"
|
|
||||||
end
|
|
@ -6,20 +6,19 @@ S3_BUCKET="https://dl.breadone.xyz/cask" # prod
|
|||||||
# S3_BUCKET="https://dl.breadone.xyz/homebrew/casks" # staging
|
# S3_BUCKET="https://dl.breadone.xyz/homebrew/casks" # staging
|
||||||
|
|
||||||
# get reported version of app, remove quotes, print just the version
|
# get reported version of app, remove quotes, print just the version
|
||||||
version=$(mdls -name kMDItemVersion "$APP_FILE" | tr -d '"' | awk '{print $3}')
|
version=$(mdls -name kMDItemVersion $APP_FILE | tr -d '"' | awk '{print $3}')
|
||||||
|
|
||||||
# just the app file name, eg Things3.app
|
# just the app file name, eg Things3.app
|
||||||
FILENAME=$(basename "$APP_FILE")
|
FILENAME=$(basename $APP_FILE)
|
||||||
|
|
||||||
# remove extension, eg Things3
|
# remove extension, eg Things3
|
||||||
APPNAME="${FILENAME%.app}"
|
APP_NAME="${FILENAME%.app}"
|
||||||
APPNAME_TRIM=$(echo $APPNAME | sed 's/^[^=]*= //; s/"//g' | tr ' ' '-') # replace spaces with dashes
|
|
||||||
|
|
||||||
# interpolate to final zip name, eg Things3-3.12.5.zip
|
# interpolate to final zip name, eg Things3-3.12.5.zip
|
||||||
ZIP_PATH="$APPNAME_TRIM-$version.zip"
|
ZIP_PATH="$APP_NAME-$version.zip"
|
||||||
|
|
||||||
# Compress the file
|
# Compress the file
|
||||||
ditto -c -k --sequesterRsrc --keepParent "$APP_FILE" $ZIP_PATH
|
ditto -c -k --sequesterRsrc --keepParent $APP_FILE $ZIP_PATH
|
||||||
|
|
||||||
# Get hash of file
|
# Get hash of file
|
||||||
hash=$(sha256 $ZIP_PATH | awk '{ print $4 }')
|
hash=$(sha256 $ZIP_PATH | awk '{ print $4 }')
|
||||||
@ -30,16 +29,14 @@ curl -X PUT "$S3_BUCKET/$ZIP_PATH" \
|
|||||||
--data-binary "@$ZIP_PATH"
|
--data-binary "@$ZIP_PATH"
|
||||||
|
|
||||||
# output (mostly complete) cask file
|
# output (mostly complete) cask file
|
||||||
echo 'cask "'$(echo "$APPNAME_TRIM" | tr '[:upper:]' '[:lower:]')'" do' # lowercase appname
|
echo 'cask "'$(echo "$APP_NAME" | tr '[:upper:]' '[:lower:]')'" do' # lowercase appname
|
||||||
echo ' version "'$version'"'
|
echo ' version "'$version'"'
|
||||||
echo ' sha256 "'$hash'"'
|
echo ' sha256 "'$hash'"'
|
||||||
echo ''
|
echo ''
|
||||||
echo ' url "'$S3_BUCKET/$ZIP_PATH'"'
|
echo ' url "'$S3_BUCKET/$ZIP_PATH'"'
|
||||||
echo ' name "'$APPNAME'"'
|
echo ' name "'$APP_NAME'"'
|
||||||
echo ' desc "ENTER_DESCRIPTION"'
|
echo ' desc "ENTER_DESCRIPTION"'
|
||||||
echo ' homepage "ENTER_HOMEPAGE"'
|
echo ' homepage "ENTER_HOMEPAGE"'
|
||||||
echo ''
|
echo ''
|
||||||
echo ' app "'$FILENAME'"'
|
echo ' app "'$FILENAME'"'
|
||||||
echo 'end'
|
echo 'end'
|
||||||
|
|
||||||
rm $ZIP_PATH
|
|
Loading…
x
Reference in New Issue
Block a user