-
Notifications
You must be signed in to change notification settings - Fork 169
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
build: Work around OpenShift not including the .git directory
See e.g. openshift/source-to-image#457 Thankfully, OpenShift *will* do a recursive clone, so we don't need to handle that. Closes: #27
- Loading branch information
Showing
2 changed files
with
11 additions
and
5 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,4 +1,4 @@ | ||
FROM registry.fedoraproject.org/fedora:28 | ||
WORKDIR /root/src | ||
COPY . /root/src | ||
RUN ./build.sh | ||
RUN ./build.sh |
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 |
---|---|---|
|
@@ -3,11 +3,17 @@ set -xeuo pipefail | |
|
||
srcdir=$(pwd) | ||
|
||
# Init submodules | ||
ls -al .git mantle | ||
dnf -y install git | ||
# Work around https://github.com/coreos/coreos-assembler/issues/27 | ||
if ! test -d .git; then | ||
dnf -y install git | ||
(git config --global user.email [email protected] | ||
git init && git add . && git commit -a -m 'dummy commit' | ||
git tag -m tag dummy-tag) >/dev/null | ||
fi | ||
|
||
if ! test -f mantle/README.md; then | ||
git submodule update --init | ||
echo "Run: git submodule update --init" 1>&2 | ||
exit 1 | ||
fi | ||
|
||
# We want to run what builds we can as an unprivileged user; | ||
|