Merge branch 'main' into pr/664

This commit is contained in:
Armin Briegel
2022-09-02 10:23:14 +02:00
7 changed files with 274 additions and 36 deletions

View File

@@ -160,10 +160,10 @@ downloadURLFromGit() { # $1 git user name, $2 git repo name
if [ -n "$archiveName" ]; then
#downloadURL=$(curl -L --silent --fail "https://api.github.com/repos/$gitusername/$gitreponame/releases/latest" | awk -F '"' "/browser_download_url/ && /$archiveName\"/ { print \$4; exit }")
downloadURL=https://github.com$(curl -sL "https://github.com/$gitusername/$gitreponame/releases/latest" | tr '"' "\n" | grep -o "\/$gitusername\/$gitreponame.*$archiveName.*")
downloadURL=https://github.com$(curl -sfL "https://github.com/$gitusername/$gitreponame/releases/latest" | tr '"' "\n" | grep -i "^/.*\/releases\/download\/.*$archiveName" | head -1)
else
#downloadURL=$(curl -L --silent --fail "https://api.github.com/repos/$gitusername/$gitreponame/releases/latest" | awk -F '"' "/browser_download_url/ && /$filetype\"/ { print \$4; exit }")
downloadURL=https://github.com$(curl -sL "https://github.com/$gitusername/$gitreponame/releases/latest" | tr '"' "\n" | grep -o "\/$gitusername\/$gitreponame.*\.$filetype")
downloadURL=https://github.com$(curl -sfL "https://github.com/$gitusername/$gitreponame/releases/latest" | tr '"' "\n" | grep -i "^/.*\/releases\/download\/.*\.$filetype" | head -1)
fi
if [ -z "$downloadURL" ]; then
cleanupAndExit 14 "could not retrieve download URL for $gitusername/$gitreponame" ERROR

View File

@@ -0,0 +1,7 @@
cocoapods)
name="CocoaPods"
type="bz2"
downloadURL="$(downloadURLFromGit CocoaPods CocoaPods-app)"
appNewVersion="$(versionFromGit CocoaPods CocoaPods-app)"
expectedTeamID="AX2Q2BH2XR"
;;

View File

@@ -15,6 +15,29 @@ fi
# MARK: application download and installation starts here
# Debug output of all variables in a label
printlog "name=${name}" DEBUG
printlog "appName=${appName}" DEBUG
printlog "type=${type}" DEBUG
printlog "archiveName=${archiveName}" DEBUG
printlog "downloadURL=${downloadURL}" DEBUG
printlog "curlOptions=${curlOptions}" DEBUG
printlog "appNewVersion=${appNewVersion}" DEBUG
printlog "appCustomVersion function: $(if type 'appCustomVersion' 2>/dev/null | grep -q 'function'; then echo "Defined. ${appCustomVersion}"; else; echo "Not defined"; fi)" DEBUG
printlog "versionKey=${versionKey}" DEBUG
printlog "packageID=${packageID}" DEBUG
printlog "pkgName=${pkgName}" DEBUG
printlog "choiceChangesXML=${choiceChangesXML}" DEBUG
printlog "expectedTeamID=${expectedTeamID}" DEBUG
printlog "blockingProcesses=${blockingProcesses}" DEBUG
printlog "installerTool=${installerTool}" DEBUG
printlog "CLIInstaller=${CLIInstaller}" DEBUG
printlog "CLIArguments=${CLIArguments}" DEBUG
printlog "updateTool=${updateTool}" DEBUG
printlog "updateToolArguments=${updateToolArguments}" DEBUG
printlog "updateToolRunAsCurrentUser=${updateToolRunAsCurrentUser}" DEBUG
#printlog "Company=${Company}" DEBUG # Not used
if [[ ${INTERRUPT_DND} = "no" ]]; then
# Check if a fullscreen app is active
if hasDisplaySleepAssertion; then
@@ -75,7 +98,7 @@ printlog "Label type: $type" INFO
# MARK: extract info from data
if [ -z "$archiveName" ]; then
case $type in
dmg|pkg|zip|tbz)
dmg|pkg|zip|tbz|bz2)
archiveName="${name}.$type"
;;
pkgInDmg)
@@ -101,7 +124,7 @@ fi
if [ -z "$targetDir" ]; then
case $type in
dmg|zip|tbz|app*)
dmg|zip|tbz|bz2|app*)
targetDir="/Applications"
;;
pkg*)
@@ -282,7 +305,7 @@ case $type in
zip)
installFromZIP
;;
tbz)
tbz|bz2)
installFromTBZ
;;
pkgInDmg)

View File

@@ -1 +1 @@
10.0beta1
10.0beta2