From a4ca41b94ee38331065fb6e3f1c30f48a8e36e24 Mon Sep 17 00:00:00 2001 From: Fabrice Meyer Date: Mon, 5 Feb 2024 13:39:42 +0100 Subject: [PATCH] Update makefile to make a clean build --- .github/workflows/release.yml | 3 +-- Makefile | 17 ++++++++++++++++- 2 files changed, 17 insertions(+), 3 deletions(-) diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml index 8180a41..739c09f 100644 --- a/.github/workflows/release.yml +++ b/.github/workflows/release.yml @@ -17,8 +17,7 @@ jobs: path: ${{ env.APP_NAME }} - name: Run build - run: cd ${{ env.APP_NAME }} && make -# run: cd ${{ env.APP_NAME }} && make appstore + run: cd ${{ env.APP_NAME }} && make appstore - name: Upload app tarball to release uses: svenstaro/upload-release-action@v2 diff --git a/Makefile b/Makefile index 7a42e8c..d90c4dc 100644 --- a/Makefile +++ b/Makefile @@ -1,7 +1,8 @@ app_name=documentserver_community project_dir=$(CURDIR)/../$(app_name) build_dir=$(project_dir)/build -appstore_dir=$(build_dir)/appstore +appstore_build_directory=$(CURDIR)/build/artifacts/appstore +appstore_package_name=$(appstore_build_directory)/$(app_name) sign_dir=$(build_dir)/sign package_name=$(app_name) cert_dir=$(HOME)/.nextcloud/certificates @@ -12,6 +13,20 @@ clean: rm -rf 3rdparty/onlyoffice rm -rf build +appstore: + make clean + make all + rm -rf $(appstore_build_directory) + mkdir -p $(appstore_build_directory) + tar cvzf $(appstore_package_name).tar.gz \ + --exclude-vcs \ + --exclude="../$(app_name)/build" \ + --exclude="../$(app_name)/tests" \ + --exclude="../$(app_name)/Makefile" \ + --exclude="../$(app_name)/screenshots" \ + --exclude="../$(app_name)/.*" \ + --exclude="../$(app_name)/krankerl.toml" \ + 3rdparty/onlyoffice/documentserver: mkdir -p 3rdparty/onlyoffice mkdir -p oo-extract