-
Notifications
You must be signed in to change notification settings - Fork 153
feat: handle default and supported values for building in source per workflow #418
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
Merged
torresxb1
merged 6 commits into
aws:develop
from
torresxb1:build-in-source-defaults-and-support
Jan 5, 2023
Merged
Changes from all commits
Commits
Show all changes
6 commits
Select commit
Hold shift + click to select a range
1e3dcb2
feat: handle default and supported values for building in source per …
torresxb1 c577665
show warning log instead of erroring out for unsupported values
torresxb1 7622456
improve class constant validation
torresxb1 17cca44
minor update to warning message
torresxb1 0548da4
tiny refactor to logic for setting default
torresxb1 b65d205
Merge branch 'develop' into build-in-source-defaults-and-support
torresxb1 File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
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
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
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -2,7 +2,7 @@ | |
ProvidedMakeWorkflow | ||
""" | ||
from aws_lambda_builders.workflows.custom_make.validator import CustomMakeRuntimeValidator | ||
from aws_lambda_builders.workflow import BaseWorkflow, Capability | ||
from aws_lambda_builders.workflow import BaseWorkflow, Capability, BuildInSourceSupport | ||
from aws_lambda_builders.actions import CopySourceAction | ||
from aws_lambda_builders.path_resolver import PathResolver | ||
from .actions import CustomMakeAction | ||
|
@@ -23,6 +23,9 @@ class CustomMakeWorkflow(BaseWorkflow): | |
|
||
EXCLUDED_FILES = (".aws-sam", ".git") | ||
|
||
BUILD_IN_SOURCE_BY_DEFAULT = False | ||
BUILD_IN_SOURCE_SUPPORT = BuildInSourceSupport.OPTIONALLY_SUPPORTED | ||
|
||
def __init__(self, source_dir, artifacts_dir, scratch_dir, manifest_path, runtime=None, osutils=None, **kwargs): | ||
|
||
super(CustomMakeWorkflow, self).__init__( | ||
|
@@ -44,10 +47,6 @@ def __init__(self, source_dir, artifacts_dir, scratch_dir, manifest_path, runtim | |
|
||
subprocess_make = SubProcessMake(make_exe=self.binaries["make"].binary_path, osutils=self.os_utils) | ||
|
||
# Don't build in source by default (backwards compatibility) | ||
if build_in_source is None: | ||
build_in_source = False | ||
|
||
Comment on lines
-47
to
-50
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. I recently added this in a previous PR to handle build-in-source defaults for custom makefile, but it's not needed anymore with the new class constant logic ( |
||
# an explicitly definied working directory should take precedence | ||
working_directory = options.get("working_directory") or self._select_working_directory( | ||
source_dir, scratch_dir, build_in_source | ||
|
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
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
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
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
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
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
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
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
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
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
Oops, something went wrong.
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.
Uh oh!
There was an error while loading. Please reload this page.