build: make build-and-push.sh runnable from any directory
- Resolve PROJECT_DIR from the script's own location by default (works with absolute, relative and symlinked invocations) - Allow override via --project-dir flag or PROJECT_DIR env var - Improve error message for invalid --project-dir paths - Update usage and README accordingly
This commit is contained in:
@@ -18,6 +18,10 @@ The script reads `artifactId` and `version` from `pom.xml` for the image name
|
||||
and tag, builds for `linux/amd64`, and verifies the image is present on the
|
||||
remote after pushing. See `./scripts/build-and-push.sh --help` for all flags.
|
||||
|
||||
It can be invoked from any directory: by default it resolves the project root
|
||||
from the script's own location. Override with `--project-dir PATH` or the
|
||||
`PROJECT_DIR` environment variable when needed.
|
||||
|
||||
## Running the application in dev mode
|
||||
|
||||
You can run your application in dev mode that enables live coding using:
|
||||
|
||||
Reference in New Issue
Block a user