From 5a46bd645828560d1ea34a333ed209a96e9f6a4f Mon Sep 17 00:00:00 2001 From: theofficialgman <28281419+theofficialgman@users.noreply.github.com> Date: Sat, 7 May 2022 10:58:11 -0400 Subject: [PATCH] add 386, arm, and arm64 to ubuntu buildscripts current use of 64 and 32 in github actions is unaffected and will function as before added arm, and arm64 as acceptable TARGET_ARCH options --- dependencies.json | 18 ++++++++++++++++++ script/build-ubuntu.sh | 13 +++++++------ 2 files changed, 25 insertions(+), 6 deletions(-) diff --git a/dependencies.json b/dependencies.json index 5d39b4eb..1d71653e 100644 --- a/dependencies.json +++ b/dependencies.json @@ -27,6 +27,24 @@ "name": "git-lfs-linux-amd64-v3.1.2.tar.gz", "checksum": "a10bb562658a65ad0e22f331bc43f2cb292a57d21c5b26f52794257e48fcbe10" }, + { + "platform": "linux", + "arch": "386", + "name": "git-lfs-linux-386-v3.1.2.tar.gz", + "checksum": "5fe6c7cf76a218e2e0bbb8c34344981a5cb77774bbb99d1e8986e0967d061015" + }, + { + "platform": "linux", + "arch": "arm64", + "name": "git-lfs-linux-arm64-v3.1.2.tar.gz", + "checksum": "c6152c4e24e0575396ee80be8049bf258659fec552f81b410705beed25712ba0" + }, + { + "platform": "linux", + "arch": "arm", + "name": "git-lfs-linux-arm-v3.1.2.tar.gz", + "checksum": "cbe2c3e2effa7b168876c9104247f4c5328abadf4a2e3019707510255e7bf46a" + }, { "platform": "windows", "arch": "x86", diff --git a/script/build-ubuntu.sh b/script/build-ubuntu.sh index 85e36cac..51e36b9d 100755 --- a/script/build-ubuntu.sh +++ b/script/build-ubuntu.sh @@ -20,11 +20,12 @@ if [[ -z "${CURL_INSTALL_DIR}" ]]; then exit 1 fi -if [ "$TARGET_ARCH" = "64" ]; then - DEPENDENCY_ARCH="amd64" -else - DEPENDENCY_ARCH="x86" -fi +case "$TARGET_ARCH" in + "64") DEPENDENCY_ARCH="amd64" ;; + "arm64") DEPENDENCY_ARCH="arm64" ;; + "arm") DEPENDENCY_ARCH="arm" ;; + *) DEPENDENCY_ARCH="386" ;; +esac CURRENT_DIR="$( cd "$( dirname "${BASH_SOURCE[0]}" )" && pwd )" GIT_LFS_VERSION="$(jq --raw-output '.["git-lfs"].version[1:]' dependencies.json)" @@ -72,7 +73,7 @@ DESTDIR="$DESTINATION" \ if [[ "$GIT_LFS_VERSION" ]]; then echo "-- Bundling Git LFS" GIT_LFS_FILE=git-lfs.tar.gz - GIT_LFS_URL="https://github.com/git-lfs/git-lfs/releases/download/v${GIT_LFS_VERSION}/git-lfs-linux-amd64-v${GIT_LFS_VERSION}.tar.gz" + GIT_LFS_URL="https://github.com/git-lfs/git-lfs/releases/download/v${GIT_LFS_VERSION}/git-lfs-linux-${DEPENDENCY_ARCH}-v${GIT_LFS_VERSION}.tar.gz" echo "-- Downloading from $GIT_LFS_URL" curl -sL -o $GIT_LFS_FILE "$GIT_LFS_URL" COMPUTED_SHA256=$(compute_checksum $GIT_LFS_FILE)