This repository was archived by the owner on Feb 25, 2025. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 6k
Add ability to stamp fuchsia packages with API level #29851
Merged
Merged
Changes from all commits
Commits
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
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 |
|---|---|---|
|
|
@@ -63,6 +63,8 @@ def main(): | |
| '--manifest-json-file', dest='manifest_json_file', action='store', required=True) | ||
| parser.add_argument( | ||
| '--far-name', dest='far_name', action='store', required=False) | ||
| parser.add_argument( | ||
| '--api-level', dest='api_level', action='store', required=False) | ||
|
|
||
| args = parser.parse_args() | ||
|
|
||
|
|
@@ -98,10 +100,18 @@ def main(): | |
| # Use check_output so if anything goes wrong we get the output. | ||
| try: | ||
|
|
||
| build_command = ['build', '--output-package-manifest', args.manifest_json_file] | ||
|
|
||
| if args.api_level is not None: | ||
| build_command = ['--api-level', args.api_level] + build_command | ||
|
|
||
| archive_command = ['archive', '--output='+ os.path.join(os.path.dirname(output_dir), args.far_name + "-0")] | ||
|
Contributor
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. Can you file a bug to get rid of the -0? It complicates people's workflows because the fars aren't named that everywhere, only in our repo. It's also useless since it's just an arbitrary thing we hardcore here |
||
|
|
||
| pm_commands = [ | ||
| ['build', '--output-package-manifest', args.manifest_json_file], | ||
| ['archive', '--output='+ os.path.join(os.path.dirname(output_dir), args.far_name + "-0")], | ||
| build_command, | ||
| archive_command | ||
| ] | ||
|
|
||
| for pm_command in pm_commands: | ||
| subprocess.check_output(pm_command_base + pm_command) | ||
| except subprocess.CalledProcessError as e: | ||
|
|
||
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
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.
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.
sorry, I'm still struggling with GN :( where does this variable come from? Do all gn_args[] get put into the namespace as variables automatically?
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.
It comes from the import above where we import //build/fuchsia/config.gni. This is a gn thing, when you put a variable in a declare_args it makes it available as a global after an import.