Skip to content

Commit fbe65be

Browse files
committed
feat: Add self-update command to easily have a fresh code.mk file
1 parent c0bbd5d commit fbe65be

File tree

2 files changed

+14
-1
lines changed

2 files changed

+14
-1
lines changed

README.md

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -66,3 +66,11 @@ make code.fix.diff branch=main
6666
make code.config.publish
6767
```
6868
2. Modify `ecs.php` file to fit your needs.
69+
70+
71+
#### Update
72+
You can download a fresh `code.mk` file using the following command:
73+
74+
```shell
75+
make code.self-update
76+
```

bin/code.mk

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,6 +6,8 @@ branch ?= develop
66
ECS_IMAGE := hub.jcdev.net:24000/php-code-analysis-tool:${version}
77
#ECS_IMAGE := docker.io/library/dockerize-php-code-analysis-php-code-analysis-tool
88

9+
CODE_MK_DOWNLOAD_URL=https://raw.githubusercontent.com/justcoded/dockerize-php-code-analysis/main/bin/code.mk
10+
911
# Define default path if one is not passed
1012
ifndef path
1113
ifneq ("$(wildcard src)","")
@@ -79,4 +81,7 @@ code.config.publish:
7981
@echo '...........Published "ecs.php"'
8082

8183
code.self-update:
82-
echo $(shell pwd)
84+
@echo '...........Downloading new code.mk file'
85+
@$(eval CODE_MK_PATH = $(shell find ./ -name code.mk))
86+
$(shell curl -o ${CODE_MK_PATH} ${CODE_MK_DOWNLOAD_URL})
87+
@echo '...........Downloaded. Path: ${CODE_MK_PATH}'

0 commit comments

Comments
 (0)