Skip to content

Commit

Permalink
Merge pull request #2 from Magnitus-/master
Browse files Browse the repository at this point in the history
Made firmware repo composable with a sensible default. Added composable option whether to output artifacts in timestamped directory.
  • Loading branch information
DieterReuter authored Mar 9, 2018
2 parents 511ad6f + 11d1cb7 commit 934a35e
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 3 deletions.
4 changes: 3 additions & 1 deletion Dockerfile
Original file line number Diff line number Diff line change
@@ -1,7 +1,9 @@
FROM alpine:3.7

WORKDIR /workdir
ENV FIRMWARE=/workdir/raspberry-firmware
ENV FIRMWARE=/workdir/raspberry-firmware \
FIRMWARE_REPO=https://www.github.com/raspberrypi/firmware \
TIMESTAMP_OUTPUT=true

# Install build dependencies
RUN apk add --no-cache bash git
Expand Down
8 changes: 6 additions & 2 deletions build-tarball.sh
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,11 @@ set -x
# Create target dir for build artefacts
WORKDIR=$PWD
BUILD_NR=${BUILD_NR:=$(date '+%Y%m%d-%H%M%S')}
BUILD_DEST=/builds/$BUILD_NR
if [ "$TIMESTAMP_OUTPUT" == "true" ]; then
BUILD_DEST=/builds/$BUILD_NR
else
BUILD_DEST=/builds
fi
mkdir -p $BUILD_DEST

# Clone the upstream GH repo
Expand All @@ -17,7 +21,7 @@ if [[ -d $FIRMWARE ]]; then
git checkout $BRANCH
else
# clone repo
git clone --single-branch --branch $BRANCH --depth 1 https://www.github.com/raspberrypi/firmware $FIRMWARE
git clone --single-branch --branch $BRANCH --depth 1 $FIRMWARE_REPO $FIRMWARE
cd $FIRMWARE
fi

Expand Down

0 comments on commit 934a35e

Please sign in to comment.