-
Notifications
You must be signed in to change notification settings - Fork 4k
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
chore: remove packaging prerequisites requirements from build #11691
Conversation
Thank you for contributing! Your pull request will be updated from master and then merged automatically (do not update manually, and be sure to allow changes to be pushed to your fork). |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
How about instead changing check-prerequisites
to take a parameter instead, say 'stage'?
This can be set to 'build' or 'pack'.
This way if a pre-requisite is needed for multiple stages, we can avoid duplicating this across multiple scripts. And keep the min versions consistent.
A script called check-prerequisites.sh
that does nothing but simply has bash functions doesn't make much sense.
@nija Im not sure accepting the stage will make it better, I think that splitting the scrips makes it cleaner. The |
I agree that it could maybe be factored some more, there's a lot of repetition now. Don't mind 2 entry-level scripts that use functions from another script. I kind of like the straightforwardness of everything. This is better than what we had, so why not move forward an inch (instead of a mile?) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The check-prerequisites.sh is a util file, I agree it can be named better. Let me know if changing the name of the
check-prerequisites.sh
file tocheck-prerequisites-util.sh
is sufficient and I will make the change.
I would just get rid of the check-prerequisites.sh
file and duplicate the 6ish lines of code in both files. It's not that much to keep in a common bash file.
However, if you want to keep it as a separate file, I would call it prerequisites.bash
where .bash
suffix indicates that it's not a script. Also, make sure to remove the 'x' flag so that it's no longer an executable.
@nija-at removed the util file. |
AWS CodeBuild CI Report
Powered by github-codebuild-logs, available on the AWS Serverless Application Repository |
Thank you for contributing! Your pull request will be updated from master and then merged automatically (do not update manually, and be sure to allow changes to be pushed to your fork). |
Split the prerequisites check for
pack
andbuild
. Executingbuild
does not execute pack, which means it does not require the tools for packaging (mvn
,python
,.Net
,java
) to be installed locally.This PR splits
check-prerequisites
into two separate scripts,check-build-prerequisites
andcheck-pack-prerequisites
.For build check:
node
yarn
docker
(arguable, but fine)For pack check:
mvn
java
.Net
python
By submitting this pull request, I confirm that my contribution is made under the terms of the Apache-2.0 license