From 4313babeba6b40a811d87957c5e6086e080ea88a Mon Sep 17 00:00:00 2001 From: Cameron Gutman Date: Fri, 15 Jan 2021 20:15:18 -0600 Subject: [PATCH] Allow the commit to build to be specified --- build-amd64.sh | 2 +- build-l4t.sh | 2 +- build-rpi.sh | 2 +- scripts/build-package.sh | 7 ++++--- 4 files changed, 7 insertions(+), 6 deletions(-) diff --git a/build-amd64.sh b/build-amd64.sh index f20f497..407bfc8 100755 --- a/build-amd64.sh +++ b/build-amd64.sh @@ -8,4 +8,4 @@ set -e mkdir $OUT_DIR docker build -f $DOCKERFILE -t cgutman/moonlight-packaging:$TAG_NAME . -docker run -it --rm --mount type=bind,source="$(pwd)"/$OUT_DIR,target=/out --mount type=bind,source="$(pwd)"/debian,target=/opt/debian cgutman/moonlight-packaging:$TAG_NAME \ No newline at end of file +docker run -it --rm --mount type=bind,source="$(pwd)"/$OUT_DIR,target=/out --mount type=bind,source="$(pwd)"/debian,target=/opt/debian -e COMMIT="$1" cgutman/moonlight-packaging:$TAG_NAME \ No newline at end of file diff --git a/build-l4t.sh b/build-l4t.sh index 8a1c9e2..a4b46c1 100755 --- a/build-l4t.sh +++ b/build-l4t.sh @@ -8,4 +8,4 @@ set -e mkdir $OUT_DIR docker build -f $DOCKERFILE -t cgutman/moonlight-packaging:$TAG_NAME . -docker run -it --rm --runtime nvidia --mount type=bind,source="$(pwd)"/$OUT_DIR,target=/out --mount type=bind,source="$(pwd)"/debian,target=/opt/debian cgutman/moonlight-packaging:$TAG_NAME \ No newline at end of file +docker run -it --rm --runtime nvidia --mount type=bind,source="$(pwd)"/$OUT_DIR,target=/out --mount type=bind,source="$(pwd)"/debian,target=/opt/debian -e COMMIT="$1" cgutman/moonlight-packaging:$TAG_NAME \ No newline at end of file diff --git a/build-rpi.sh b/build-rpi.sh index c00ac24..791c05b 100755 --- a/build-rpi.sh +++ b/build-rpi.sh @@ -8,4 +8,4 @@ set -e mkdir $OUT_DIR docker build -f $DOCKERFILE -t cgutman/moonlight-packaging:$TAG_NAME . -docker run -it --rm --mount type=bind,source="$(pwd)"/$OUT_DIR,target=/out --mount type=bind,source="$(pwd)"/debian,target=/opt/debian cgutman/moonlight-packaging:$TAG_NAME \ No newline at end of file +docker run -it --rm --mount type=bind,source="$(pwd)"/$OUT_DIR,target=/out --mount type=bind,source="$(pwd)"/debian,target=/opt/debian -e COMMIT="$1" cgutman/moonlight-packaging:$TAG_NAME \ No newline at end of file diff --git a/scripts/build-package.sh b/scripts/build-package.sh index 3f88557..b2ab3bb 100755 --- a/scripts/build-package.sh +++ b/scripts/build-package.sh @@ -1,10 +1,11 @@ set -e # Check out the source -[[ ! -z "$BRANCH" ]] || BRANCH="master" -echo "Checking out $BRANCH" -git clone --recursive --branch $BRANCH --depth 1 https://github.com/moonlight-stream/moonlight-qt.git +[[ ! -z "$COMMIT" ]] || COMMIT="master" +echo "Checking out $COMMIT" +git clone https://github.com/moonlight-stream/moonlight-qt.git cd moonlight-qt +git checkout $COMMIT git log -1 # Grab the verson metadata