-
Notifications
You must be signed in to change notification settings - Fork 177
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Enhance Dockerfile for local building (#1002)
Added a caching layer in the docker build for compiling all of the vendor dependencies, drops compilation time to about 15s Added support in Dockerfile for passing BUILD_VERSION and NIGHTLY_RELEASE to build.sh Add compile-with-docker target Split out how we get the git commit SHA so it's reusable for docker image tag
- Loading branch information
Showing
4 changed files
with
45 additions
and
35 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,14 @@ | ||
#!/bin/bash | ||
|
||
set -euo pipefail | ||
|
||
if command -v git &>/dev/null && git rev-parse &>/dev/null; then | ||
GIT_COMMIT=$(git rev-parse --short HEAD) | ||
if [ -n "$(git status --porcelain --untracked-files=no)" ]; then | ||
GIT_COMMIT="$GIT_COMMIT-unsupported" | ||
fi | ||
echo $GIT_COMMIT | ||
exit 0 | ||
fi | ||
echo >&2 'error: unable to determine the git revision' | ||
exit 1 |