Improve the image tag name in the makefile
Created by: LinuxSuRen
What type of PR is this?
/kind cleanup
What this PR does / why we need it:
Cannot get a correct image tag when the git tag name like fix/xxx
. See also the following test result:
Before:
gitpod /workspace/console $ make image image-push
rm -rf build && mkdir -p build
tar --exclude=".git" --exclude='node_modules' --exclude='build' --warning=no-file-changed -czf build/console.tar.gz .
docker build build -t surenpi:bugfix/editor-cant-save-init-value-dev -f Dockerfile.multistage
invalid argument "surenpi:bugfix/editor-cant-save-init-value-dev" for "-t, --tag" flag: invalid reference format
See 'docker build --help'.
make: *** [Makefile:22: image] Error 125
After:
gitpod /workspace/console $ git checkout -b fix/image
Switched to a new branch 'fix/image'
gitpod /workspace/console $ make image
rm -rf build && mkdir -p build
tar --exclude=".git" --exclude='node_modules' --exclude='build' --warning=no-file-changed -czf build/console.tar.gz .
docker build build -t surenpi:fix-image-dev -f Dockerfile.multistage
Which issue(s) this PR fixes:
None.
Special notes for reviewers:
None.
Does this PR introduced a user-facing change?
None
Additional documentation, usage docs, etc.:
None