All checks were successful
farmcontrol/farmcontrol-server/pipeline/head This commit looks good
Introduce a new pdfUtils.js file for on-demand PDF conversion using pdf-to-img and sharp. Update package.json to include new build scripts for Linux packaging, enhancing the build process with public package handling. Add .npmrc for public hoisting patterns and create build-linux-packages.sh for streamlined package creation.
22 lines
570 B
Bash
Executable File
22 lines
570 B
Bash
Executable File
#!/usr/bin/env bash
|
|
set -euo pipefail
|
|
|
|
version="$(node -p "require('./package.json').version")"
|
|
output_dir="app_dist/linux"
|
|
binary="${output_dir}/farmcontrol-server"
|
|
|
|
common_fpm_args=(
|
|
-f
|
|
-s dir
|
|
-n farmcontrol-server
|
|
-p "${output_dir}/"
|
|
-v "${version}"
|
|
--after-install packaging/linux/after-install.sh
|
|
--after-remove packaging/linux/after-remove.sh
|
|
"${binary}=/usr/bin/farmcontrol-server"
|
|
packaging/linux/farmcontrol-server.service=/lib/systemd/system/farmcontrol-server.service
|
|
)
|
|
|
|
fpm -t deb "${common_fpm_args[@]}"
|
|
fpm -t rpm "${common_fpm_args[@]}"
|