Files
openproject/packaging/setup
T
2025-06-23 15:08:12 +02:00

26 lines
1.1 KiB
Bash
Executable File

#!/usr/bin/env bash
# Set RELEASE_DATE for the application
date -u +"%Y-%m-%dT%H:%M:%SZ" > RELEASE_DATE
# Copy default database.yml
cp -f config/database.production.yml config/database.yml
cp -f packaging/conf/configuration.yml config/configuration.yml
sed -i "s|config.public_file_server.enabled = false|config.public_file_server.enabled = true|" config/environments/production.rb
# Specific npmrc used for packaging
cp -f packaging/.npmrc .npmrc
# replace every occurrence of _APP_NAME_ with the corresponding application name we're packaging
find packaging/ -type f -print0 | xargs -0 sed -i "s|_APP_NAME_|${APP_NAME}|"
# Embed BIM dependencies for air-gapped use
mkdir -p vendor/bim
pushd vendor/bim
# These are referenced in /packaging/addons/openproject-edition/bin/preinstall
wget --quiet https://github.com/KhronosGroup/COLLADA2GLTF/releases/download/v2.1.5/COLLADA2GLTF-v2.1.5-linux.zip
wget --quiet https://s3.amazonaws.com/ifcopenshell-builds/IfcConvert-v0.7.11-fea8e3a-linux64.zip
wget --quiet https://github.com/bimspot/xeokit-metadata/releases/download/1.0.1/xeokit-metadata-linux-x64.tar.gz
popd