-
Type: Bug
-
Status: To Do (View Workflow)
-
Priority: Medium
-
Resolution: Unresolved
-
Affects Version/s: None
-
Fix Version/s: None
-
Component/s: ci-system
-
Labels:None
-
Story Points:0
repo:bbsim/Makefile is ripe for refactoring, plenty of duplication: commands, args, etc within targets.
Items of note:
- GO* macros near the top can be refactored into a single base docker run command.
- Subsequent GO_* macros can be written as base + extra args
GO_SH = docker run -rm --user $$(id -u):$$(id -g) -v ${CURDIR}:/app $(shell test -t 0 && echo "-it") -v gocache:/.cache -v gocache${VOLTHA_TOOLS_VERSION}:/go/pkg voltha/voltha-ci-tools:${VOLTHA_TOOLS_VERSION}-golang sh -c '# fix-editor-colorization-quote(')
The GO_SH command contains a dangling single quote.
Closing quote is detached from this definition, appended to target rules with syntax such as (done').
- This adversely affects editor colorization.
- Also to better insulate rules from typos or rogue shell command output GO_SH can be implemented as a function:
go-sh = $(docker-run) ' (args passed to macro) '
$(call go-sh,"some ; shell ; commands")