Updated build

master
Meliurwen 2 years ago
parent acdb01b5f5
commit 2ac60d145d
  1. 8
      src/build.npm.sh
  2. 3
      src/build.sh
  3. 53
      src/getsauce.sh
  4. 36
      src/main.sh

@ -2,13 +2,15 @@
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 python-is-python3 sudo python3-minimal python3-distutils apt-get -qq -y --no-install-recommends install curl jq ca-certificates git g++ gcc make clang wget xz-utils python-is-python3 sudo python3-minimal python3-distutils
mkdir build_node mkdir build_node
cd build_node/ || exit cd build_node/ || exit
wget https://nodejs.org/dist/v16.13.0/node-v16.13.0.tar.xz wget https://nodejs.org/dist/$NODE_VERSION/node-$NODE_VERSION.tar.xz
tar xf node-v16.13.0.tar.xz tar xf node-$NODE_VERSION.tar.xz
mv node-v16.13.0 node mv node-$NODE_VERSION node
cd node || exit cd node || exit
./configure ./configure
make -j4 make -j4

@ -7,8 +7,7 @@ apt-get -y --no-install-recommends install git jq imagemagick curl build-essenti
npm install yarn --global npm install yarn --global
git clone https://github.com/VSCodium/vscodium.git cd "${1:-vscodium}" || exit
cd vscodium/ || exit
sed '/create_appimage\.sh/d' -i build.sh sed '/create_appimage\.sh/d' -i build.sh

@ -0,0 +1,53 @@
#!/bin/sh
set -e
if [ $# -eq 0 ]; then
echo "No arguments provided. Aborting..."
exit 1
fi
if [ "$1" = "-h" ] || [ "$1" = "--help" ]; then
echo "usage: ./getsauce.sh [-h] [mode <URL|repoName> [checkout]]
Retrieves the source for you.
Possible values for the arguments:
mode git, github-tar
URL url of the repo
repoName name of the repo with user/org included (e.g. username/repo or organization/repo)
checkout tag, branch or complete hash of a commit
Dependencies: curl jq ca-certificates git
"
exit 0
fi
if [ $# -lt 2 ]; then
echo "Arguments \"mode\" and \"URL/repoName\" not provided. Aborting..."
exit 1
fi
GET_SRC_MODE=$1
URL_REPONAME=$2
[ ! -z ${3+x} ] && CHECKOUT=$3
[ -z ${REPO_PATH+x} ] && REPO_PATH="project"
SRC_DIR_PATH="./"
TMP_DIR="tmp_extract"
if [ $GET_SRC_MODE = "github-tar" ]; then
mkdir "${TMP_DIR}"
curl --silent --fail -L "https://api.github.com/repos/${URL_REPONAME}/tarball/${CHECKOUT}" -o - | tar xvz -f - -C "$SRC_DIR_PATH" || rm -rf "${TMP_DIR}" && exit 1
mv "${TMP_DIR}"/* "${REPO_PATH}/"
elif [ $GET_SRC_MODE = "git" ]; then
TMP_POSITION="${PWD}"
git clone "${URL_REPONAME}" "${REPO_PATH}"
cd "${REPO_PATH}"
[ ! -z ${CHECKOUT+x} ] && git checkout "${CHECKOUT}"
cd "${TMP_POSITION}"
else
echo "Not valid mode"
exit 1
fi

@ -2,12 +2,44 @@
set -e set -e
echo "Updating apt..."
apt-get -qq update
echo "Installing get tools..."
apt-get -qq -y --no-install-recommends install curl jq ca-certificates git > /dev/null
REPO_NAME="VSCodium/vscodium"
REPO_URL="https://github.com/${REPO_NAME}.git"
if [ -z ${1+x} ]; then
echo "No release selected, selecting the latest..."
CHECKOUT="$(curl --silent --fail --show-error "https://api.github.com/repos/${REPO_NAME}/releases/latest" | jq -r .tag_name)"
echo "Latest release: ${CHECKOUT}"
else
CHECKOUT="${1}"
echo "Release selected: ${CHECKOUT}"
fi
echo "Getting the source..."
REPO_PATH=vscodium ./getsauce.sh "git" \
"${REPO_URL}" \
"${CHECKOUT}"
NODE_VERSION="$(cat project/.nvmrc)"
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..." echo "Building node..."
./build.npm.sh ./build.npm.sh $NODE_VERSION
#./install.npm.thirdparty.sh && sudo apt-get -qq -y --no-install-recommends install python-is-python3 #./install.npm.thirdparty.sh && sudo apt-get -qq -y --no-install-recommends install python-is-python3
fi
echo "Building VSCodium..." echo "Building VSCodium..."
./build.sh ./build.sh "$REPO_PATH"
echo "Package(s) deploy..." echo "Package(s) deploy..."
DIST_DIR="/srv/build/vscodium/vscode/.build/linux/deb/amd64/deb" DIST_DIR="/srv/build/vscodium/vscode/.build/linux/deb/amd64/deb"

Loading…
Cancel
Save