From 87bc4d22f018405530c1c3aa1db06518670b3739 Mon Sep 17 00:00:00 2001 From: Ben Vincent Date: Sat, 25 Jan 2025 17:04:08 +1100 Subject: [PATCH] feat: fetch master during build - fetch master branch during build.sh process - ensure the clean target is called with the default --- Makefile | 2 +- ci/build.sh | 1 + 2 files changed, 2 insertions(+), 1 deletion(-) diff --git a/Makefile b/Makefile index f3678f6..fe14123 100644 --- a/Makefile +++ b/Makefile @@ -17,7 +17,7 @@ DIRS := $(shell find $(IMAGES_PATH) -mindepth 3 -maxdepth 3 -type d | sed 's|$(I .PHONY: list $(DIRS) .DEFAULT_GOAL := default -default: +default: clean ./ci/build.sh # Make all images diff --git a/ci/build.sh b/ci/build.sh index f8be9e2..46fe8ca 100755 --- a/ci/build.sh +++ b/ci/build.sh @@ -1,6 +1,7 @@ #!/bin/bash # Check for changes in images/ folder and the builds/ folder +git fetch origin master:master if [ "$(git branch --show-current)" = "master" ]; then builds_changes=$(git diff --name-only HEAD^...master | grep -E '^builds/') images_changes=$(git diff --name-only HEAD^...master | grep -E '^images/')