Improvements to makefile and development container#3539
Merged
Conversation
Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
This makes some minor improvments to the dev container:
- add `nano` as an alternative to `vi` to help beginning contributors, or people
that don't remember how to quit `vi` ;-)
- add `jq` as it's often handy to have available to debug JSON output.
- set a custom prompt to make it clearer that the user is in a container
- add a short MOTD that shows that the user is in a container, and a pointer
to 'make help' (we can add more help/instructions to this MOTD in future).
Before this patch:
make -f docker.Makefile dev
...
bash-5.1#
With this patch:
make -f docker.Makefile dev
...
You are now in a development container. Run 'make help' to learn about
available make targets.
root@docker-cli-dev$
Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
This change allows some make targets to be ran outside the dev-container for
easier discovery and use:
- `make clean` can be used on the host (as artifacts created from within the
development container are usually stored on the host).
- `make help` was already allowed
- `make dev` and `make shell` are added to the regular Makefile, to make it
easier to create and start the development container.
- When attempting to run `make dev` from within the development container, a
message is printed, and the target is cancelled:
root@docker-cli-dev$ make dev
you are already in the dev container
Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
Member
Author
Codecov Report
@@ Coverage Diff @@
## master #3539 +/- ##
=======================================
Coverage 59.00% 59.00%
=======================================
Files 284 284
Lines 23839 23839
=======================================
Hits 14066 14066
Misses 8914 8914
Partials 859 859 |
Member
Author
|
Thx! Let me bring this one in |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
This makes some small improvements to the makefile and development container:
Makefile: add missing help messages for some targets
Some targets didn't have a help message. After this:
Dockerfile.dev: set prompt, add nano and jq, and set MOTD
This makes some minor improvments to the dev container:
nanoas an alternative tovito help beginning contributors, or peoplethat don't remember how to quit
vi;-)jqas it's often handy to have available to debug JSON output.to 'make help' (we can add more help/instructions to this MOTD in future).
Before this patch:
With this patch:
Makefile: don't warn "outside container" for some targets
This change allows some make targets to be ran outside the dev-container for
easier discovery and use:
make cleancan be used on the host (as artifacts created from within thedevelopment container are usually stored on the host).
make helpwas already allowedmake devandmake shellare added to the regular Makefile, to make iteasier to create and start the development container.
When attempting to run
make devfrom within the development container, amessage is printed, and the target is cancelled:
root@docker-cli-dev$ make dev you are already in the dev containerThe warning has also been tweaked slightly:
- Description for the changelog
- A picture of a cute animal (not mandatory but encouraged)