summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorChristian Breunig <christian@breunig.cc>2024-06-18 17:46:56 +0200
committerGitHub <noreply@github.com>2024-06-18 17:46:56 +0200
commitda5d29aa83666da52d5e7ba2c795a9220203e197 (patch)
tree17b5a6021af14af4f72f53ed1384e7db2858973d
parent7de082dd3b5361959db0560f38d7968fda8981a9 (diff)
parentc18b30dab33ff110eb439e51f784b2b272e8359f (diff)
downloadvyos-1x-da5d29aa83666da52d5e7ba2c795a9220203e197.tar.gz
vyos-1x-da5d29aa83666da52d5e7ba2c795a9220203e197.zip
Merge pull request #3678 from natali-rs1985/T6492-current
T6492: Check if all migrators have the executable bit set
-rw-r--r--Makefile8
1 files changed, 7 insertions, 1 deletions
diff --git a/Makefile b/Makefile
index cc382e206..509b47858 100644
--- a/Makefile
+++ b/Makefile
@@ -78,7 +78,7 @@ vyshim:
$(MAKE) -C $(SHIM_DIR)
.PHONY: all
-all: clean interface_definitions op_mode_definitions check test j2lint vyshim
+all: clean interface_definitions op_mode_definitions check test j2lint vyshim check_migration_scripts_executable
.PHONY: check
.ONESHELL:
@@ -103,6 +103,12 @@ test:
set -e; python3 -m compileall -q -x '/vmware-tools/scripts/, /ppp/' .
PYTHONPATH=python/ python3 -m "nose" --with-xunit src --with-coverage --cover-erase --cover-xml --cover-package src/conf_mode,src/op_mode,src/completion,src/helpers,src/validators,src/tests --verbose
+.PHONY: check_migration_scripts_executable
+.ONESHELL:
+check_migration_scripts_executable:
+ @echo "Checking if migration scripts have executable bit set..."
+ find src/migration-scripts -type f -not -executable -print -exec false {} + || sh -c 'echo "Found files that are not executable! Add permissions." && exit 1'
+
.PHONY: j2lint
j2lint:
ifndef J2LINT