Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Submit feedback
Sign in
Toggle navigation
F
Front-End
Project
Project
Details
Activity
Releases
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
abdullh.alsoleman
Front-End
Commits
3441743c
Unverified
Commit
3441743c
authored
Apr 11, 2020
by
Herbert Poul
Committed by
GitHub
Apr 11, 2020
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
[macos] build: add build-number and buid-name arguments (#53928)
parent
35ed1ccc
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
30 additions
and
0 deletions
+30
-0
build_macos.dart
packages/flutter_tools/lib/src/commands/build_macos.dart
+2
-0
build_macos_test.dart
..._tools/test/commands.shard/hermetic/build_macos_test.dart
+28
-0
No files found.
packages/flutter_tools/lib/src/commands/build_macos.dart
View file @
3441743c
...
...
@@ -23,6 +23,8 @@ class BuildMacosCommand extends BuildSubCommand {
addBuildModeFlags
();
addDartObfuscationOption
();
usesExtraFrontendOptions
();
usesBuildNumberOption
();
usesBuildNameOption
();
}
@override
...
...
packages/flutter_tools/test/commands.shard/hermetic/build_macos_test.dart
View file @
3441743c
...
...
@@ -211,6 +211,34 @@ void main() {
FeatureFlags:
()
=>
TestFeatureFlags
(
isMacOSEnabled:
true
),
});
testUsingContext
(
'macOS build supports build-name and build-number'
,
()
async
{
final
BuildCommand
command
=
BuildCommand
();
createMinimalMockProjectFiles
();
await
createTestCommandRunner
(
command
).
run
(
const
<
String
>[
'build'
,
'macos'
,
'--debug'
,
'--build-name=1.2.3'
,
'--build-number=42'
,
],
);
final
String
contents
=
fileSystem
.
file
(
'./macos/Flutter/ephemeral/Flutter-Generated.xcconfig'
)
.
readAsStringSync
();
expect
(
contents
,
contains
(
'FLUTTER_BUILD_NAME=1.2.3'
));
expect
(
contents
,
contains
(
'FLUTTER_BUILD_NUMBER=42'
));
},
overrides:
<
Type
,
Generator
>{
FileSystem:
()
=>
fileSystem
,
ProcessManager:
()
=>
FakeProcessManager
.
list
(<
FakeCommand
>[
setUpMockXcodeBuildHandler
(
'Debug'
)
]),
Platform:
()
=>
macosPlatform
,
FeatureFlags:
()
=>
TestFeatureFlags
(
isMacOSEnabled:
true
),
});
testUsingContext
(
'Refuses to build for macOS when feature is disabled'
,
()
{
final
CommandRunner
<
void
>
runner
=
createTestCommandRunner
(
BuildCommand
());
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment