diff options
| -rw-r--r-- | .build.yml (renamed from .builds/x86_64_arch.yml) | 7 | ||||
| -rw-r--r-- | Makefile | 15 |
2 files changed, 14 insertions, 8 deletions
diff --git a/.builds/x86_64_arch.yml b/.build.yml index 3b90e37..37d77a6 100644 --- a/.builds/x86_64_arch.yml +++ b/.build.yml @@ -42,9 +42,4 @@ tasks: flatpak remote-add --user --if-not-exists flathub https://flathub.org/repo/flathub.flatpakrepo - release: | cd map-linux - if [ "$GIT_REF" = "refs/heads/main" ]; then - make -e target=x86_64-unknown-linux-gnu -e channel=unstable -e flatpak_cargo_generator=/home/build/flatpak-builder-tools/cargo release - elif echo "$GIT_REF" | grep -q "refs/tags/"; then - channel=$(echo "$GIT_REF" | sed 's|refs/tags/||') - make -e target=x86_64-unknown-linux-gnu -e channel=$channel -e flatpak_cargo_generator=/home/build/flatpak-builder-tools/cargo release - fi + make -e target=x86_64-unknown-linux-gnu -e flatpak_cargo_generator=/home/build/flatpak-builder-tools/cargo ci @@ -1,4 +1,4 @@ -profile := release +profile := dev target = $(shell rustc -vV | grep host | awk '{print $$2}') channel := unstable @@ -249,7 +249,8 @@ distribute: distribute-tar distribute-flatpak distribute-appimage distribute-pac # Release ###################################################################### -release: lint build-containers package distribute +release: + $(MAKE) profile=release build-containers package distribute # Installation ################################################################# @@ -277,6 +278,16 @@ uninstall: rm -f $(prefix)/share/locale/$$locale/LC_MESSAGES/systems.tranquil.Map.mo; \ done +ci: lint +# Installation ################################################################# +ifeq ($(GIT_REF),refs/heads/main) + $(MAKE) -e channel=unstable release +else ifneq (,$(findstring refs/tags/,$(GIT_REF))) + $(MAKE) -e channel=$(subst refs/tags/,,$(GIT_REF)) release +else + @echo "Not in CI environment." +endif + .PHONY: default build test coverage format lint \ find_translatable_files extract_strings compile_translations \ update_flatpak_dependencies \ |