diff --git a/SparkleShare/Mac/checkGit.sh b/SparkleShare/Mac/checkGit.sh index 316cad39..c882fbeb 100755 --- a/SparkleShare/Mac/checkGit.sh +++ b/SparkleShare/Mac/checkGit.sh @@ -13,39 +13,17 @@ function abspath() export projectFolder=$(dirname $0) export projectFolder=$(abspath ${projectFolder}) - -export gitVersion=$(cat ${projectFolder}/git.version) -export gitLfsVersion=$(cat ${projectFolder}/git-lfs.version) +export gitDownload=$(cat ${projectFolder}/git.download) set -e -if [ ! -f ${projectFolder}/git-${gitVersion}.tar.gz ] +if [ ! -f ${projectFolder}/git.tar.gz ] then - curl -s -L https://www.kernel.org/pub/software/scm/git/git-${gitVersion}.tar.gz > git.tar.gz - curl -s -L https://github.com/github/git-lfs/releases/download/v${gitLfsVersion}/git-lfs-darwin-amd64-${gitLfsVersion}.tar.gz > git-lfs.tar.gz - + curl -s -L ${gitDownload} > git.tar.gz test -e git.tar.gz || { echo "Failed to download git"; exit 1; } - test -e git-lfs.tar.gz || { echo "Failed to download git-lfs"; exit 1; } - tar xzf git.tar.gz - tar xzf git-lfs.tar.gz - - cd git-${gitVersion} - make configure - ./configure --prefix=${projectFolder}/git --with-openssl=no - make install - cd .. - - cd git-lfs-${gitLfsVersion} - cp git-lfs ${projectFolder}/git/libexec/git-core - cd .. - - tar czf git-${gitVersion}.tar.gz git - - rm -rf git - rm -rf git-${gitVersion} - rm -rf git-lfs-${gitLfsVersion} - - rm git.tar.gz - rm git-lfs.tar.gz + mkdir git/ + tar xzf git.tar.gz --directory git/ + tar czf git.tar.gz git/ + rm -rf git/ fi diff --git a/SparkleShare/Mac/git-lfs.version b/SparkleShare/Mac/git-lfs.version deleted file mode 100644 index 88c5fb89..00000000 --- a/SparkleShare/Mac/git-lfs.version +++ /dev/null @@ -1 +0,0 @@ -1.4.0 diff --git a/SparkleShare/Mac/git.download b/SparkleShare/Mac/git.download new file mode 100644 index 00000000..556ff9a5 --- /dev/null +++ b/SparkleShare/Mac/git.download @@ -0,0 +1 @@ +https://github.com/desktop/dugite-native/releases/download/v2.15.1-rc2/dugite-native-v2.15.1-macOS-56.tar.gz diff --git a/SparkleShare/Mac/git.version b/SparkleShare/Mac/git.version deleted file mode 100644 index b70ae75a..00000000 --- a/SparkleShare/Mac/git.version +++ /dev/null @@ -1 +0,0 @@ -2.14.1 diff --git a/SparkleShare/Mac/postBuild.sh b/SparkleShare/Mac/postBuild.sh index 86dda990..6fe1222d 100755 --- a/SparkleShare/Mac/postBuild.sh +++ b/SparkleShare/Mac/postBuild.sh @@ -3,13 +3,12 @@ # Expect path to app bundle argument export bundle=$1 export projectFolder=$(dirname $0) -export gitVersion=$(cat ${projectFolder}/git.version) 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-${gitVersion}.tar.gz -C ${bundle}/Contents/Resources +tar -x -f ${projectFolder}/git.tar.gz --directory ${bundle}/Contents/Resources cp -R SparkleShareInviteOpener.app ${bundle}/Contents/Resources cp config ${bundle}/Contents/MonoBundle