diff --git a/Dockerfile b/Dockerfile new file mode 100644 index 0000000..4c85e24 --- /dev/null +++ b/Dockerfile @@ -0,0 +1,9 @@ +FROM debian:sid-slim + +COPY ./src /srv/build + +WORKDIR /srv/build + +VOLUME ["/srv/build/repo/incoming"] + +ENTRYPOINT ["./main.sh"] diff --git a/launch.sh b/launch.sh new file mode 100644 index 0000000..66e6416 --- /dev/null +++ b/launch.sh @@ -0,0 +1,7 @@ +#!/bin/sh + +set -e + +docker build -t deltachat-desktop . +docker run --rm -v /srv/incoming:/srv/build/repo/incoming deltachat-desktop +docker image rm deltachat-desktop diff --git a/src/build.sh b/src/build.sh new file mode 100755 index 0000000..c935040 --- /dev/null +++ b/src/build.sh @@ -0,0 +1,20 @@ +#!/bin/sh + +set -e + +cd project + +echo "Installing build dependencies (apt)..." +apt-get -qq -y --no-install-recommends install npm cargo > /dev/null +echo "Installing build dependencies (npm)..." +npm install +echo "Build dependencies installed." + +echo "Building the app..." +NODE_ENV=production npm run build +NO_ASAR=true npm run pack:generate_config +echo "App built successfully." + +echo "Packaging..." +npm run pack:linux +echo "App packaged successfully." diff --git a/deploy.sh b/src/deploy.sh similarity index 100% rename from deploy.sh rename to src/deploy.sh diff --git a/getsauce.sh b/src/getsauce.sh similarity index 100% rename from getsauce.sh rename to src/getsauce.sh diff --git a/build.sh b/src/main.sh similarity index 67% rename from build.sh rename to src/main.sh index e6a6c40..f998959 100755 --- a/build.sh +++ b/src/main.sh @@ -25,24 +25,7 @@ echo "Getting the source..." "${REPO_URL}" \ "${CHECKOUT}" -cd project - -echo "Installing build dependencies (apt)..." -apt-get -qq -y --no-install-recommends install npm cargo > /dev/null -echo "Installing build dependencies (npm)..." -npm install -echo "Build dependencies installed." - -echo "Building the app..." -NODE_ENV=production npm run build -NO_ASAR=true npm run pack:generate_config -echo "App built successfully." - -echo "Packaging..." -npm run pack:linux -echo "App packaged successfully." - -cd .. +./build.sh echo "Package(s) deploy..." DIST_DIR="project/dist"