Kong / kong-build-tools

Build tools to package and release Kong
Apache License 2.0
83 stars 72 forks source link

chore(make): include pre-make ENVs in debug #597

Closed curiositycasualty closed 1 year ago

curiositycasualty commented 1 year ago

Previously, the debug make target didn't display ENVs that existed in the environment, or make default variables, before make ran because VARS_OLD := $(.VARIABLES) naively includes all existing ENVs and default make variables.

Now, the debug make target will inspect this makefile itself using make -pn ... to get a more complete list of variables (make + environment).

This PR also fixes a minor bug where an ENV that had a semicolon in it wouldn't be displayed properly:

$ export COLORFGBG='15;0'
$ make debug
...
/bin/bash: 0: command not found
COLORFGBG = 15;0
COLORFGBG = 15
...
curiositycasualty commented 1 year ago

https://github.com/Kong/kong-build-tools/pull/597/commits/7875103c12826c7dc37c36dbe158de61bd53db58 Fixes:

+ make PACKAGE_TYPE=deb RESTY_IMAGE_BASE=debian RESTY_IMAGE_TAG=10 package-kong test cleanup
starting make in kong-build-tools
Makefile:15: *** unterminated call to function 'filter-out': missing ')'.  Stop.
script returned exit code 2

Make ironically didn't like the # in the grep querying the output of Make.

github-actions[bot] commented 1 year ago

:tada: This PR is included in version 4.39.4 :tada:

The release is available on GitHub release

Your semantic-release bot :package::rocket: