-
Notifications
You must be signed in to change notification settings - Fork 66
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
build.sh: Add support for build flags #14
Open
orzen
wants to merge
10
commits into
ngs:master
Choose a base branch
from
orzen:master
base: master
Could not load branches
Branch not found: {{ refName }}
Loading
Could not load tags
Nothing to show
Loading
Are you sure you want to change the base?
Some commits from the old base branch may be removed from the timeline,
and old review comments may become outdated.
Conversation
This file contains 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
Currently, it is not possible to adjust the build process for personal needs. With this patch it will be possible to add compiler and linker flags as well as adjust the name of the output if the CMD_PATH != PROJECT_NAME, e.g. "cmd/foo/main.go".
Export BUILD_FLAGS to an empty value if the action is called without an explicit BUILD_FLAGS value.
Currenty, PROJECT_NAME is used referenced in `build.sh`. However, it will always be empty since PROJECT_NAME is not exported in `entrypoint.sh`. This patch exports PROJECT_NAME so it becomes accessible in `build.sh`.
The name of the build output was enforced to project name. This patch adds a configurable name for the build output dictated by BIN_NAME. The the output will default to $PROJECT_NAME$EXT if BIN_NAME is left unset. Note that `BUILD_FLAGS="-o $BIN_NAME"` must be used if the `basename $CMD_PATH` != BIN_NAME.
OUTPUT can be altered through various configurations and environment variables. This can cause OUTPUT to contain a name which is not pointing to a file. This patch adds a check and a warning message if OUTPUT contains a name for a non-existing file before returning it. This should improve debugging.
Launch shell with expected options intead of explicitly setting them in the shell script.
Launch shell with expected options intead of explicitly setting them in the shell script.
I'm not sure builder and compiler flags should be going into a release action. That should be the responsibility of the specific package creator's build.sh |
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.
Currently, it is not possible to adjust the build process for personal
needs.
With this patch it will be possible to add compiler and linker flags as
well as adjust the name of the output if the CMD_PATH != PROJECT_NAME,
e.g. "cmd/foo/main.go".