Updated build

master
Meliurwen 2 years ago
parent fb7a648283
commit 748e1dcbbd
Signed by: meliurwen
GPG Key ID: 818A8B35E9F1CE10
  1. 2
      Dockerfile
  2. 25
      src/build.npm.sh
  3. 8
      src/build.sh
  4. 28
      src/main.sh

@ -6,4 +6,4 @@ WORKDIR /srv/build
VOLUME ["/srv/build/repo/incoming"] VOLUME ["/srv/build/repo/incoming"]
ENTRYPOINT ["./main.sh", "master"] ENTRYPOINT ["./main.sh"]

@ -2,13 +2,30 @@
set -e set -e
NODE_VERSION=$1
apt-get update apt-get update
apt-get -qq -y --no-install-recommends install curl jq ca-certificates git g++ gcc make clang wget xz-utils python3 sudo apt-get -qq -y --no-install-recommends install \
curl \
jq \
ca-certificates \
git \
g++ \
gcc \
make \
clang \
wget \
xz-utils \
sudo \
python3-minimal \
python3-distutils \
python-is-python3
mkdir build_node mkdir build_node
cd build_node/ || exit cd build_node/ || exit
wget https://nodejs.org/dist/v17.5.0/node-v17.5.0.tar.xz wget https://nodejs.org/dist/$NODE_VERSION/node-$NODE_VERSION.tar.xz
tar xf node-v17.5.0.tar.xz tar xf node-$NODE_VERSION.tar.xz
mv node-v17.5.0 node mv node-$NODE_VERSION node
cd node || exit cd node || exit
./configure ./configure
make -j4 make -j4

@ -2,13 +2,7 @@
set -e set -e
#echo "Installing build dependencies (third party)..." cd "${1:-deltachat-desktop}"
#./install.npm.thirdparty.sh
echo "Installing build dependencies (npm official source)..."
./build.npm.sh
cd project
#echo "Installing build dependencies (apt)..." #echo "Installing build dependencies (apt)..."
#apt-get -qq -y --no-install-recommends install npm cargo > /dev/null #apt-get -qq -y --no-install-recommends install npm cargo > /dev/null

@ -20,16 +20,38 @@ else
echo "Release selected: ${CHECKOUT}" echo "Release selected: ${CHECKOUT}"
fi fi
REPO_PATH=deltachat-desktop
echo "Getting the source..." echo "Getting the source..."
./getsauce.sh "git" \ REPO_PATH="$REPO_PATH" ./getsauce.sh "git" \
"${REPO_URL}" \ "${REPO_URL}" \
"${CHECKOUT}" "${CHECKOUT}"
./build.sh
NODE_VERSION="v16.14.2"
echo "Checking if node is already installed..."
if command -v node; then
echo "Node already installed."
node --version
else
echo "Node not installed."
echo "Building node ($NODE_VERSION)..."
./build.npm.sh $NODE_VERSION
#./install.npm.thirdparty.sh
fi
echo "Building deltachat-desktop..."
./build.sh "$REPO_PATH"
echo "Package(s) deploy..." echo "Package(s) deploy..."
DIST_DIR="project/dist" DIST_DIR="$REPO_PATH/dist"
INCOMING_DIR="repo/incoming" INCOMING_DIR="repo/incoming"
READY_SUFFIX=".ready" READY_SUFFIX=".ready"
mkdir -p "${INCOMING_DIR}" mkdir -p "${INCOMING_DIR}"
if [ -d "${DIST_DIR}" ]; then
./deploy.sh "${DIST_DIR}" "${INCOMING_DIR}" "${READY_SUFFIX}" ./deploy.sh "${DIST_DIR}" "${INCOMING_DIR}" "${READY_SUFFIX}"
else
printf "%s\n" "No dist dir found! Aborting..."
exit 1
fi

Loading…
Cancel
Save