Commit d7105a60 authored by Drew's avatar Drew

swift-2.2-SNAPSHOT-2015-12-31-a

parent a2add6c6
FROM debian:latest
MAINTAINER Drew Crawford
ENV SWIFT_TAG="swift-2.2-SNAPSHOT-2015-12-22-a" RUNTIME_PACKAGES="clang libedit2 libpython2.7 libxml2 libicu52" BUILDTIME_PACKAGES="git ca-certificates python ninja-build cmake uuid-dev libbsd-dev libicu-dev pkg-config libedit-dev file libxml2-dev python-dev libncurses5-dev libsqlite3-dev libreadline6-dev rsync"
ENV SWIFT_TAG="__TAG__" RUNTIME_PACKAGES="clang libedit2 libpython2.7 libxml2 libicu52" BUILDTIME_PACKAGES="git ca-certificates python ninja-build cmake uuid-dev libbsd-dev libicu-dev pkg-config libedit-dev file libxml2-dev python-dev libncurses5-dev libsqlite3-dev libreadline6-dev rsync"
ADD SR-437.patch /
RUN \
# Create a directory to work in \
......@@ -21,6 +23,13 @@ cd swift && \
# Not all the folders have them (where do some of them come from??) but we'll just try them all \
find ../ -maxdepth 1 -type d -exec bash -c '(cd {} && echo checking out in `pwd` && git checkout $SWIFT_TAG)' \; && \
\
# Apply patches here \
cd ../swift-corelibs-foundation && \
ls && \
git apply < /SR-437.patch && \
cat Foundation/NSPathUtilities.swift && \
cd ../swift && \
\
# And now we build, like a good little linuxen. \
# I believe this is what the linux build script does. In practice, this builds a system into /tmp/install and then tars it up. \
./utils/build-script --preset=buildbot_linux install_destdir="/tmp/install" installable_package="/tmp/swift.tar.gz" && \
......
diff --git a/Foundation/NSPathUtilities.swift b/Foundation/NSPathUtilities.swift
index d33664f..101eff2 100644
--- a/Foundation/NSPathUtilities.swift
+++ b/Foundation/NSPathUtilities.swift
@@ -540,5 +540,6 @@ public func NSUserName() -> String {
if getlogin_r(&buffer, bufSize) == 0 {
return String.fromCString(buffer)!
}
- fatalError("Could not get current logon name.")
+ print("Could not get current logon name. \(errno)")
+ return "Jeff"
}
\ No newline at end of file
set -e
username="drewcrawford"
echo "Type tag name"
read tag
sed "s/__TAG__/$tag/" Dockerfile > Dockerfile.tagged
docker build -f Dockerfile.tagged -t $username/swift:latest .
docker tag $username/swift:latest $username/swift:$tag
id=$(docker create drewcrawford/swift:latest)
docker cp $id:usr/local/lib/swift - > swiftlibs.tar
docker build -f Runtime.dockerfile -t $username/swift-runtime:latest .
docker tag $username/swift-runtime:latest $username/swift-runtime:$tag
docker push $username/swift-runtime:latest
docker push $username/swift-runtime:$tag
docker push $username/swift:latest
docker push $username/swift:$tag
\ No newline at end of file
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment