From bf6a7d2c187a4651c430177d095171c0739a49d5 Mon Sep 17 00:00:00 2001 From: Mike Nolan Date: Sun, 7 Jul 2024 19:35:42 -0500 Subject: [PATCH] Check whether it compiles on push --- .woodpecker/.deploy.yaml | 1 - Makefile | 12 +++++++----- publish.sh | 2 +- 3 files changed, 8 insertions(+), 7 deletions(-) diff --git a/.woodpecker/.deploy.yaml b/.woodpecker/.deploy.yaml index d0eec15..0389dfe 100644 --- a/.woodpecker/.deploy.yaml +++ b/.woodpecker/.deploy.yaml @@ -7,7 +7,6 @@ steps: commands: - apt update -y - apt install -y make zip tar - - make - bash publish.sh volumes: - /mnt/20TB/Artifacts:/deploy_dir \ No newline at end of file diff --git a/Makefile b/Makefile index eda3d5d..dbfbfb4 100644 --- a/Makefile +++ b/Makefile @@ -1,9 +1,11 @@ -all: publish/linux-x64 publish/linux-arm publish/linux-arm64 publish/win-x86 publish/win-x64 publish/win-arm64 publish/osx-x64 publish/osx-arm64 publish/mono +PUBLISH:= publish + +all: $(PUBLISH)/linux-x64 $(PUBLISH)/linux-arm $(PUBLISH)/linux-arm64 $(PUBLISH)/win-x86 $(PUBLISH)/win-x64 $(PUBLISH)/win-arm64 $(PUBLISH)/osx-x64 $(PUBLISH)/osx-arm64 $(PUBLISH)/mono -publish/mono: - mkdir -p publish/mono || true && cd "TYTDLite.ServerNetFwMono" && dotnet publish -c Release -o ../publish/mono && cd ../publish/mono && tar cvzf ../mono.tar.gz . && zip -r ../mono.zip . && rm -r * && mv ../mono.tar.gz . && mv ../mono.zip . -publish/%: - mkdir -p $@ || true && cd "TYTDLite.ServerCli" && dotnet publish -c Release -o ../$@ --self-contained -p:PublishReadyToRun=true -p:PublishSingleFile=true -r $(notdir $@) +$(PUBLISH)/mono: + mkdir -p $(PUBLISH)/mono || true && cd "TYTDLite.ServerNetFwMono" && dotnet $(PUBLISH) -c Release -o ../$(PUBLISH)/mono && cd ../$(PUBLISH)/mono && tar cvzf ../mono.tar.gz . && zip -r ../mono.zip . && rm -r * && mv ../mono.tar.gz . && mv ../mono.zip . +$(PUBLISH)/%: + mkdir -p $@ || true && cd "TYTDLite.ServerCli" && dotnet $(PUBLISH) -c Release -o ../$@ --self-contained -p:$(PUBLISH)ReadyToRun=true -p:$(PUBLISH)SingleFile=true -r $(notdir $@) test: cd TYTDLite.ServerCli && dotnet build && cd ../TYTDLite.ServerNetFwMono/ && dotnet build \ No newline at end of file diff --git a/publish.sh b/publish.sh index 33d3c44..d7bb3e5 100644 --- a/publish.sh +++ b/publish.sh @@ -1,2 +1,2 @@ . /deploy_dir/setpath.sh -cp -r publish/ "$DEPLOY_DIR" \ No newline at end of file +make PUBLISH="$DEPLOY_DIR" \ No newline at end of file