Skip to content

Commit

Permalink
Merge pull request #1967 from markusstoll/bugfixes/macos-increase-git…
Browse files Browse the repository at this point in the history
…version

macOS: increase git version to 29.2-2 and improve handling of download
  • Loading branch information
hbons authored Feb 15, 2021
2 parents 948e14f + c2fd750 commit dac6783
Showing 4 changed files with 16 additions and 13 deletions.
2 changes: 1 addition & 1 deletion .gitignore
Original file line number Diff line number Diff line change
@@ -18,8 +18,8 @@ obj/
git-*
Sparkles/InstallationInfo.Directory.cs
SparkleShare/Linux/sparkleshare
SparkleShare/Mac/git/*
SparkleShare/Mac/git*
SparkleShare/Mac/*.tar.gz
/sparkleshare-*
desktop.ini
_ReSharper.*
21 changes: 11 additions & 10 deletions SparkleShare/Mac/checkGit.sh
Original file line number Diff line number Diff line change
@@ -11,6 +11,8 @@ function abspath()
esac
}

export projectFolder=$(dirname $0)
export projectFolder=$(abspath ${projectFolder})

LINE=$(cat ${projectFolder}/git.download)
TMP=()
@@ -19,23 +21,22 @@ for val in $LINE ; do
TMP+=("$val")
done

export projectFolder=$(dirname $0)
export projectFolder=$(abspath ${projectFolder})
export gitDownload="${TMP[0]}"
export gitName=${gitDownload##*/}
export gitSHA256="${TMP[1]}"


set -e


if [ ! -f ${projectFolder}/git.tar.gz ]
if [[ ! -f ${projectFolder}/${gitName} ]];
then
curl --silent --location ${gitDownload} > git.tar.gz
test -e git.tar.gz || { echo "Failed to download git"; exit 1; }
curl --silent --location ${gitDownload} > ${gitName}
test -e ${gitName} || { echo "Failed to download git"; exit 1; }

printf "${gitSHA256} git.tar.gz" | shasum --check --algorithm 256
printf "${gitSHA256} ${gitName}" | shasum --check --algorithm 256

mkdir git/
tar xzf git.tar.gz --directory git/
tar czf git.tar.gz git/
rm -rf git/
fi

rm git.tar.gz
ln -s $gitName git.tar.gz
2 changes: 1 addition & 1 deletion SparkleShare/Mac/git.download
Original file line number Diff line number Diff line change
@@ -1 +1 @@
https://github.com/desktop/dugite-native/releases/download/v2.16.2/dugite-native-v2.16.2-macOS-119.tar.gz 65d608eb16e0e262bae6bd7828b28cf640455e949003fec94c1233e084b9ccde
https://github.com/desktop/dugite-native/releases/download/v2.29.2-2/dugite-native-v2.29.2-f9ceb12-macOS.tar.gz ff16488ebbb3a0000fac34c8afc01bc4e839ad478717fbcbbe0c207642b5872c
4 changes: 3 additions & 1 deletion SparkleShare/Mac/postBuild.sh
Original file line number Diff line number Diff line change
@@ -9,5 +9,7 @@ echo Postprocessing ${bundle}...
export PATH=/usr/local/bin:/opt/local/bin:/Library/Frameworks/Mono.framework/Versions/Current/bin:/usr/bin:/bin

${projectFolder}/checkGit.sh
tar -x -f ${projectFolder}/git.tar.gz --directory ${bundle}/Contents/Resources
rm -rf ${bundle}/Contents/Resources/git
mkdir ${bundle}/Contents/Resources/git
tar -x -f ${projectFolder}/git.tar.gz --directory ${bundle}/Contents/Resources/git
cp -R SparkleShareInviteOpener.app ${bundle}/Contents/Resources

0 comments on commit dac6783

Please sign in to comment.