Skip to content

Commit

Permalink
Changed dirty check for Makefile
Browse files Browse the repository at this point in the history
  • Loading branch information
NadavTasher committed Oct 1, 2024
1 parent e46c546 commit 135fe71
Showing 1 changed file with 7 additions and 5 deletions.
12 changes: 7 additions & 5 deletions bundles/independent/Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -4,14 +4,16 @@ IMAGE_NAME := your/image
# Path to your sources
IMAGE_PATH := application

# Find all image sources
IMAGE_SOURCES := $(shell find $(IMAGE_PATH) -type f)

# Create the image tag from the commit date
IMAGE_TAG := $(shell git show --quiet --date=format:%Y.%m.%d --format=%cd)

# Create the image status from the working tree status
IMAGE_STATUS := $(shell git diff --quiet || echo "-dirty")

# Find all image sources
IMAGE_SOURCES := $(shell find $(IMAGE_PATH) -type f)
# Check if the repository has unstaged changes
ifneq ($(shell git status --porcelain),)
IMAGE_TAG := $(IMAGE_TAG)-dirty
endif

all: image

Expand Down

0 comments on commit 135fe71

Please sign in to comment.