Update build

This commit is contained in:
Kevin Yue
2024-02-25 18:02:03 +08:00
parent e8a64539aa
commit 354f50b671
2 changed files with 79 additions and 6 deletions

View File

@@ -1,4 +1,5 @@
OFFLINE ?= 0
BUILD_FE ?= 1
CARGO ?= cargo
VERSION = $(shell $(CARGO) metadata --no-deps --format-version 1 | jq -r '.packages[0].version')
@@ -50,7 +51,9 @@ build: build-fe build-rs
# Install and build the frontend
# If OFFLINE is set to 1, skip it
build-fe:
if [ $(OFFLINE) -eq 0 ]; then \
if [ $(OFFLINE) -eq 1 ] || [ $(BUILD_FE) -eq 0 ]; then \
echo "Skipping frontend build (OFFLINE=1 or BUILD_FE=0)"; \
else \
cd apps/gpgui-helper && pnpm install && pnpm build; \
fi
@@ -112,7 +115,7 @@ init-debian: clean-debian tarball
mkdir -p .build/deb
cp .build/tarball/${PKG}.tar.gz .build/deb
tar -xzf .build/deb/${PKG}.tar.gz
tar -xzf .build/deb/${PKG}.tar.gz -C .build/deb
cd .build/deb/${PKG}
debmake
@@ -136,7 +139,7 @@ deb: init-debian
check-ppa:
if [ $(OFFLINE) -eq 0 ]; then \
@echo "Error: ppa build requires offline mode (OFFLINE=1)"; \
echo "Error: ppa build requires offline mode (OFFLINE=1)"; \
fi
# Usage: make ppa SERIES=focal OFFLINE=1 PUBLISH=1
@@ -155,7 +158,7 @@ ppa: check-ppa init-debian
if [ $(PUBLISH) -eq 1 ]; then \
dput ppa:yuezk/globalprotect-openconnect ../*.changes; \
else
@echo "Skipping ppa publish (PUBLISH=0)"
echo "Skipping ppa publish (PUBLISH=0)"
fi
clean-rpm: