build: Download Github's git and lfs binaries

This commit is contained in:
Hylke Bons 2017-12-19 19:32:24 +01:00
parent 5de0be3d51
commit 987f030f57
5 changed files with 9 additions and 33 deletions

View file

@ -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

View file

@ -1 +0,0 @@
1.4.0

View file

@ -0,0 +1 @@
https://github.com/desktop/dugite-native/releases/download/v2.15.1-rc2/dugite-native-v2.15.1-macOS-56.tar.gz

View file

@ -1 +0,0 @@
2.14.1

View file

@ -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