Skip to content

Commit

Permalink
fix(Build): Don't update version when working in non-GitHub environme…
Browse files Browse the repository at this point in the history
  • Loading branch information
sihyung-maxim authored Oct 1, 2024
1 parent 293a232 commit aee8e41
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 3 deletions.
7 changes: 5 additions & 2 deletions Libraries/CMSIS/Device/Maxim/GCC/gcc.mk
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@

ifeq "$(PYTHON_CMD)" ""
# Try python
ifneq "$(wildcard $(MAXIM_PATH)/.git)" ""
ifneq "$(wildcard $(MAXIM_PATH)/.github)" ""
PYTHON_VERSION := $(shell python --version)
ifneq ($(.SHELLSTATUS),0)
PYTHON_CMD := none
Expand All @@ -46,11 +46,14 @@ endif
export PYTHON_CMD
endif

# Run script
# Make sure script exists before running. This won't run when working in the official MSDK release (non-GitHub)
ifneq ("$(wildcard $(MAXIM_PATH)/.github)", "")
# Run script if exists.
ifneq "$(PYTHON_CMD)" "none"
UPDATE_VERSION_OUTPUT := $(shell python $(MAXIM_PATH)/.github/workflows/scripts/update_version.py)
else
$(warning No Python installation detected on your system! Will not automatically update version info.)
endif
endif
endif

Expand Down
5 changes: 4 additions & 1 deletion Libraries/CMSIS/Device/Maxim/GCC/gcc_riscv.mk
Original file line number Diff line number Diff line change
Expand Up @@ -47,11 +47,14 @@ endif
export PYTHON_CMD
endif

# Run script
# Make sure script exists before running. This won't run when working in the official MSDK release (non-GitHub)
ifneq ("$(wildcard $(MAXIM_PATH)/.github)", "")
# Run script if exists.
ifneq "$(PYTHON_CMD)" "none"
UPDATE_VERSION_OUTPUT := $(shell python $(MAXIM_PATH)/.github/workflows/scripts/update_version.py)
else
$(warning No Python installation detected on your system! Will not automatically update version info.)
endif
endif
endif

Expand Down

0 comments on commit aee8e41

Please sign in to comment.