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
bc70ae0f
Unverified
Commit
bc70ae0f
authored
Oct 17, 2022
by
Casey Hillers
Committed by
GitHub
Oct 17, 2022
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
[packaging] Remove dev references (#113462)
parent
e5c8614e
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
64 additions
and
77 deletions
+64
-77
prepare_package.dart
dev/bots/prepare_package.dart
+20
-33
prepare_package_test.dart
dev/bots/test/prepare_package_test.dart
+44
-44
No files found.
dev/bots/prepare_package.dart
View file @
bc70ae0f
...
@@ -52,29 +52,19 @@ class PreparePackageException implements Exception {
...
@@ -52,29 +52,19 @@ class PreparePackageException implements Exception {
}
}
}
}
enum
Branch
{
dev
,
beta
,
stable
}
enum
Branch
{
beta
,
stable
;
String
getBranchName
(
Branch
branch
)
{
static
Branch
fromName
(
String
name
)
{
switch
(
branch
)
{
switch
(
name
)
{
case
Branch
.
beta
:
case
'beta'
:
return
'beta'
;
return
Branch
.
beta
;
case
Branch
.
dev
:
case
'stable'
:
return
'dev'
;
return
Branch
.
stable
;
case
Branch
.
stable
:
default
:
return
'stable'
;
throw
ArgumentError
(
'Invalid branch name.'
);
}
}
}
Branch
fromBranchName
(
String
name
)
{
switch
(
name
)
{
case
'beta'
:
return
Branch
.
beta
;
case
'dev'
:
return
Branch
.
dev
;
case
'stable'
:
return
Branch
.
stable
;
default
:
throw
ArgumentError
(
'Invalid branch name.'
);
}
}
}
}
...
@@ -304,9 +294,6 @@ class ArchiveCreator {
...
@@ -304,9 +294,6 @@ class ArchiveCreator {
.
trim
().
split
(
' '
).
last
.
replaceAll
(
'"'
,
''
).
split
(
'_'
)[
1
];
.
trim
().
split
(
' '
).
last
.
replaceAll
(
'"'
,
''
).
split
(
'_'
)[
1
];
})();
})();
/// Get the name of the channel as a string.
String
get
branchName
=>
getBranchName
(
branch
);
/// Returns a default archive name when given a Git revision.
/// Returns a default archive name when given a Git revision.
/// Used when an output filename is not given.
/// Used when an output filename is not given.
Future
<
String
>
get
_archiveName
async
{
Future
<
String
>
get
_archiveName
async
{
...
@@ -321,7 +308,8 @@ class ArchiveCreator {
...
@@ -321,7 +308,8 @@ class ArchiveCreator {
// unpacking it!) So, we use .zip for Mac, and the files are about
// unpacking it!) So, we use .zip for Mac, and the files are about
// 220MB larger than they need to be. :-(
// 220MB larger than they need to be. :-(
final
String
suffix
=
platform
.
isLinux
?
'tar.xz'
:
'zip'
;
final
String
suffix
=
platform
.
isLinux
?
'tar.xz'
:
'zip'
;
return
'flutter_
${os}
_
$arch${_version[frameworkVersionTag]}
-
$branchName
.
$suffix
'
;
final
String
package
=
'
${os}
_
$arch${_version[frameworkVersionTag]}
'
;
return
'flutter_
$package
-
${branch.name}
.
$suffix
'
;
}
}
/// Checks out the flutter repo and prepares it for other operations.
/// Checks out the flutter repo and prepares it for other operations.
...
@@ -425,7 +413,7 @@ class ArchiveCreator {
...
@@ -425,7 +413,7 @@ class ArchiveCreator {
// We want the user to start out the in the specified branch instead of a
// We want the user to start out the in the specified branch instead of a
// detached head. To do that, we need to make sure the branch points at the
// detached head. To do that, we need to make sure the branch points at the
// desired revision.
// desired revision.
await
_runGit
(<
String
>[
'clone'
,
'-b'
,
branch
N
ame
,
gobMirror
],
workingDirectory:
tempDir
);
await
_runGit
(<
String
>[
'clone'
,
'-b'
,
branch
.
n
ame
,
gobMirror
],
workingDirectory:
tempDir
);
await
_runGit
(<
String
>[
'reset'
,
'--hard'
,
revision
]);
await
_runGit
(<
String
>[
'reset'
,
'--hard'
,
revision
]);
// Make the origin point to github instead of the chromium mirror.
// Make the origin point to github instead of the chromium mirror.
...
@@ -624,8 +612,7 @@ class ArchivePublisher {
...
@@ -624,8 +612,7 @@ class ArchivePublisher {
final
File
outputFile
;
final
File
outputFile
;
final
ProcessRunner
_processRunner
;
final
ProcessRunner
_processRunner
;
final
bool
dryRun
;
final
bool
dryRun
;
String
get
branchName
=>
getBranchName
(
branch
);
String
get
destinationArchivePath
=>
'
${branch.name}
/
$platformName
/
${path.basename(outputFile.path)}
'
;
String
get
destinationArchivePath
=>
'
$branchName
/
$platformName
/
${path.basename(outputFile.path)}
'
;
static
String
getMetadataFilename
(
Platform
platform
)
=>
'releases_
${platform.operatingSystem.toLowerCase()}
.json'
;
static
String
getMetadataFilename
(
Platform
platform
)
=>
'releases_
${platform.operatingSystem.toLowerCase()}
.json'
;
Future
<
String
>
_getChecksum
(
File
archiveFile
)
async
{
Future
<
String
>
_getChecksum
(
File
archiveFile
)
async
{
...
@@ -666,14 +653,14 @@ class ArchivePublisher {
...
@@ -666,14 +653,14 @@ class ArchivePublisher {
if
(!
jsonData
.
containsKey
(
'current_release'
))
{
if
(!
jsonData
.
containsKey
(
'current_release'
))
{
jsonData
[
'current_release'
]
=
<
String
,
String
>{};
jsonData
[
'current_release'
]
=
<
String
,
String
>{};
}
}
(
jsonData
[
'current_release'
]
as
Map
<
String
,
dynamic
>)[
branch
N
ame
]
=
revision
;
(
jsonData
[
'current_release'
]
as
Map
<
String
,
dynamic
>)[
branch
.
n
ame
]
=
revision
;
if
(!
jsonData
.
containsKey
(
'releases'
))
{
if
(!
jsonData
.
containsKey
(
'releases'
))
{
jsonData
[
'releases'
]
=
<
Map
<
String
,
dynamic
>>[];
jsonData
[
'releases'
]
=
<
Map
<
String
,
dynamic
>>[];
}
}
final
Map
<
String
,
dynamic
>
newEntry
=
<
String
,
dynamic
>{};
final
Map
<
String
,
dynamic
>
newEntry
=
<
String
,
dynamic
>{};
newEntry
[
'hash'
]
=
revision
;
newEntry
[
'hash'
]
=
revision
;
newEntry
[
'channel'
]
=
branch
N
ame
;
newEntry
[
'channel'
]
=
branch
.
n
ame
;
newEntry
[
'version'
]
=
version
[
frameworkVersionTag
];
newEntry
[
'version'
]
=
version
[
frameworkVersionTag
];
newEntry
[
'dart_sdk_version'
]
=
version
[
dartVersionTag
];
newEntry
[
'dart_sdk_version'
]
=
version
[
dartVersionTag
];
newEntry
[
'dart_sdk_arch'
]
=
version
[
dartTargetArchTag
];
newEntry
[
'dart_sdk_arch'
]
=
version
[
dartTargetArchTag
];
...
@@ -825,7 +812,7 @@ Future<void> main(List<String> rawArguments) async {
...
@@ -825,7 +812,7 @@ Future<void> main(List<String> rawArguments) async {
'archive with. Must be the full 40-character hash. Required.'
);
'archive with. Must be the full 40-character hash. Required.'
);
argParser
.
addOption
(
argParser
.
addOption
(
'branch'
,
'branch'
,
allowed:
Branch
.
values
.
map
<
String
>((
Branch
branch
)
=>
getBranchName
(
branch
)
),
allowed:
Branch
.
values
.
map
<
String
>((
Branch
branch
)
=>
branch
.
name
),
help:
'The Flutter branch to build the archive with. Required.'
,
help:
'The Flutter branch to build the archive with. Required.'
,
);
);
argParser
.
addOption
(
argParser
.
addOption
(
...
@@ -907,7 +894,7 @@ Future<void> main(List<String> rawArguments) async {
...
@@ -907,7 +894,7 @@ Future<void> main(List<String> rawArguments) async {
final
bool
publish
=
parsedArguments
[
'publish'
]
as
bool
;
final
bool
publish
=
parsedArguments
[
'publish'
]
as
bool
;
final
bool
dryRun
=
parsedArguments
[
'dry_run'
]
as
bool
;
final
bool
dryRun
=
parsedArguments
[
'dry_run'
]
as
bool
;
final
Branch
branch
=
fromBranch
Name
(
parsedArguments
[
'branch'
]
as
String
);
final
Branch
branch
=
Branch
.
from
Name
(
parsedArguments
[
'branch'
]
as
String
);
final
ArchiveCreator
creator
=
ArchiveCreator
(
final
ArchiveCreator
creator
=
ArchiveCreator
(
tempDir
,
tempDir
,
outputDir
,
outputDir
,
...
...
dev/bots/test/prepare_package_test.dart
View file @
bc70ae0f
...
@@ -101,7 +101,7 @@ void main() {
...
@@ -101,7 +101,7 @@ void main() {
tempDir
,
tempDir
,
tempDir
,
tempDir
,
testRef
,
testRef
,
Branch
.
dev
,
Branch
.
beta
,
processManager:
processManager
,
processManager:
processManager
,
subprocessOutput:
false
,
subprocessOutput:
false
,
platform:
platform
,
platform:
platform
,
...
@@ -120,10 +120,10 @@ void main() {
...
@@ -120,10 +120,10 @@ void main() {
test
(
'sets PUB_CACHE properly'
,
()
async
{
test
(
'sets PUB_CACHE properly'
,
()
async
{
final
String
createBase
=
path
.
join
(
tempDir
.
absolute
.
path
,
'create_'
);
final
String
createBase
=
path
.
join
(
tempDir
.
absolute
.
path
,
'create_'
);
final
String
archiveName
=
path
.
join
(
tempDir
.
absolute
.
path
,
final
String
archiveName
=
path
.
join
(
tempDir
.
absolute
.
path
,
'flutter_
${platformName}
_v1.2.3-
dev
${platform.isLinux ? '.tar.xz' : '.zip'}
'
);
'flutter_
${platformName}
_v1.2.3-
beta
${platform.isLinux ? '.tar.xz' : '.zip'}
'
);
processManager
.
addCommands
(
convertResults
(<
String
,
List
<
ProcessResult
>?>{
processManager
.
addCommands
(
convertResults
(<
String
,
List
<
ProcessResult
>?>{
'git clone -b
dev
https://flutter.googlesource.com/mirrors/flutter'
:
null
,
'git clone -b
beta
https://flutter.googlesource.com/mirrors/flutter'
:
null
,
'git reset --hard
$testRef
'
:
null
,
'git reset --hard
$testRef
'
:
null
,
'git remote set-url origin https://github.com/flutter/flutter.git'
:
null
,
'git remote set-url origin https://github.com/flutter/flutter.git'
:
null
,
'git describe --tags --exact-match
$testRef
'
:
<
ProcessResult
>[
ProcessResult
(
0
,
0
,
'v1.2.3'
,
''
)],
'git describe --tags --exact-match
$testRef
'
:
<
ProcessResult
>[
ProcessResult
(
0
,
0
,
'v1.2.3'
,
''
)],
...
@@ -132,7 +132,7 @@ void main() {
...
@@ -132,7 +132,7 @@ void main() {
ProcessResult
(
0
,
0
,
'{"dartSdkVersion": "3.2.1"}'
,
''
),
ProcessResult
(
0
,
0
,
'{"dartSdkVersion": "3.2.1"}'
,
''
),
],
],
'
$dart
--version'
:
<
ProcessResult
>[
'
$dart
--version'
:
<
ProcessResult
>[
ProcessResult
(
0
,
0
,
'Dart SDK version: 2.17.0-63.0.
dev (dev
) (Wed Jan 26 03:48:52 2022 -0800) on "
${platformName}
_x64"'
,
''
),
ProcessResult
(
0
,
0
,
'Dart SDK version: 2.17.0-63.0.
beta (beta
) (Wed Jan 26 03:48:52 2022 -0800) on "
${platformName}
_x64"'
,
''
),
],
],
if
(
platform
.
isWindows
)
'7za x
${path.join(tempDir.path, 'mingit.zip')}
'
:
null
,
if
(
platform
.
isWindows
)
'7za x
${path.join(tempDir.path, 'mingit.zip')}
'
:
null
,
'
$flutter
doctor'
:
null
,
'
$flutter
doctor'
:
null
,
...
@@ -157,9 +157,9 @@ void main() {
...
@@ -157,9 +157,9 @@ void main() {
test
(
'calls the right commands for archive output'
,
()
async
{
test
(
'calls the right commands for archive output'
,
()
async
{
final
String
createBase
=
path
.
join
(
tempDir
.
absolute
.
path
,
'create_'
);
final
String
createBase
=
path
.
join
(
tempDir
.
absolute
.
path
,
'create_'
);
final
String
archiveName
=
path
.
join
(
tempDir
.
absolute
.
path
,
final
String
archiveName
=
path
.
join
(
tempDir
.
absolute
.
path
,
'flutter_
${platformName}
_v1.2.3-
dev
${platform.isLinux ? '.tar.xz' : '.zip'}
'
);
'flutter_
${platformName}
_v1.2.3-
beta
${platform.isLinux ? '.tar.xz' : '.zip'}
'
);
final
Map
<
String
,
List
<
ProcessResult
>?>
calls
=
<
String
,
List
<
ProcessResult
>?>{
final
Map
<
String
,
List
<
ProcessResult
>?>
calls
=
<
String
,
List
<
ProcessResult
>?>{
'git clone -b
dev
https://flutter.googlesource.com/mirrors/flutter'
:
null
,
'git clone -b
beta
https://flutter.googlesource.com/mirrors/flutter'
:
null
,
'git reset --hard
$testRef
'
:
null
,
'git reset --hard
$testRef
'
:
null
,
'git remote set-url origin https://github.com/flutter/flutter.git'
:
null
,
'git remote set-url origin https://github.com/flutter/flutter.git'
:
null
,
'git describe --tags --exact-match
$testRef
'
:
<
ProcessResult
>[
ProcessResult
(
0
,
0
,
'v1.2.3'
,
''
)],
'git describe --tags --exact-match
$testRef
'
:
<
ProcessResult
>[
ProcessResult
(
0
,
0
,
'v1.2.3'
,
''
)],
...
@@ -168,7 +168,7 @@ void main() {
...
@@ -168,7 +168,7 @@ void main() {
ProcessResult
(
0
,
0
,
'{"dartSdkVersion": "3.2.1"}'
,
''
),
ProcessResult
(
0
,
0
,
'{"dartSdkVersion": "3.2.1"}'
,
''
),
],
],
'
$dart
--version'
:
<
ProcessResult
>[
'
$dart
--version'
:
<
ProcessResult
>[
ProcessResult
(
0
,
0
,
'Dart SDK version: 2.17.0-63.0.
dev (dev
) (Wed Jan 26 03:48:52 2022 -0800) on "
${platformName}
_x64"'
,
''
),
ProcessResult
(
0
,
0
,
'Dart SDK version: 2.17.0-63.0.
beta (beta
) (Wed Jan 26 03:48:52 2022 -0800) on "
${platformName}
_x64"'
,
''
),
],
],
if
(
platform
.
isWindows
)
'7za x
${path.join(tempDir.path, 'mingit.zip')}
'
:
null
,
if
(
platform
.
isWindows
)
'7za x
${path.join(tempDir.path, 'mingit.zip')}
'
:
null
,
'
$flutter
doctor'
:
null
,
'
$flutter
doctor'
:
null
,
...
@@ -191,7 +191,7 @@ void main() {
...
@@ -191,7 +191,7 @@ void main() {
tempDir
,
tempDir
,
tempDir
,
tempDir
,
testRef
,
testRef
,
Branch
.
dev
,
Branch
.
beta
,
processManager:
processManager
,
processManager:
processManager
,
subprocessOutput:
false
,
subprocessOutput:
false
,
platform:
platform
,
platform:
platform
,
...
@@ -204,9 +204,9 @@ void main() {
...
@@ -204,9 +204,9 @@ void main() {
test
(
'adds the arch name to the archive for non-x64'
,
()
async
{
test
(
'adds the arch name to the archive for non-x64'
,
()
async
{
final
String
createBase
=
path
.
join
(
tempDir
.
absolute
.
path
,
'create_'
);
final
String
createBase
=
path
.
join
(
tempDir
.
absolute
.
path
,
'create_'
);
final
String
archiveName
=
path
.
join
(
tempDir
.
absolute
.
path
,
final
String
archiveName
=
path
.
join
(
tempDir
.
absolute
.
path
,
'flutter_
${platformName}
_arm64_v1.2.3-
dev
${platform.isLinux ? '.tar.xz' : '.zip'}
'
);
'flutter_
${platformName}
_arm64_v1.2.3-
beta
${platform.isLinux ? '.tar.xz' : '.zip'}
'
);
final
Map
<
String
,
List
<
ProcessResult
>?>
calls
=
<
String
,
List
<
ProcessResult
>?>{
final
Map
<
String
,
List
<
ProcessResult
>?>
calls
=
<
String
,
List
<
ProcessResult
>?>{
'git clone -b
dev
https://flutter.googlesource.com/mirrors/flutter'
:
null
,
'git clone -b
beta
https://flutter.googlesource.com/mirrors/flutter'
:
null
,
'git reset --hard
$testRef
'
:
null
,
'git reset --hard
$testRef
'
:
null
,
'git remote set-url origin https://github.com/flutter/flutter.git'
:
null
,
'git remote set-url origin https://github.com/flutter/flutter.git'
:
null
,
'git describe --tags --exact-match
$testRef
'
:
<
ProcessResult
>[
ProcessResult
(
0
,
0
,
'v1.2.3'
,
''
)],
'git describe --tags --exact-match
$testRef
'
:
<
ProcessResult
>[
ProcessResult
(
0
,
0
,
'v1.2.3'
,
''
)],
...
@@ -215,7 +215,7 @@ void main() {
...
@@ -215,7 +215,7 @@ void main() {
ProcessResult
(
0
,
0
,
'{"dartSdkVersion": "3.2.1"}'
,
''
),
ProcessResult
(
0
,
0
,
'{"dartSdkVersion": "3.2.1"}'
,
''
),
],
],
'
$dart
--version'
:
<
ProcessResult
>[
'
$dart
--version'
:
<
ProcessResult
>[
ProcessResult
(
0
,
0
,
'Dart SDK version: 2.17.0-63.0.
dev (dev
) (Wed Jan 26 03:48:52 2022 -0800) on "
${platformName}
_arm64"'
,
''
),
ProcessResult
(
0
,
0
,
'Dart SDK version: 2.17.0-63.0.
beta (beta
) (Wed Jan 26 03:48:52 2022 -0800) on "
${platformName}
_arm64"'
,
''
),
],
],
if
(
platform
.
isWindows
)
'7za x
${path.join(tempDir.path, 'mingit.zip')}
'
:
null
,
if
(
platform
.
isWindows
)
'7za x
${path.join(tempDir.path, 'mingit.zip')}
'
:
null
,
'
$flutter
doctor'
:
null
,
'
$flutter
doctor'
:
null
,
...
@@ -238,7 +238,7 @@ void main() {
...
@@ -238,7 +238,7 @@ void main() {
tempDir
,
tempDir
,
tempDir
,
tempDir
,
testRef
,
testRef
,
Branch
.
dev
,
Branch
.
beta
,
processManager:
processManager
,
processManager:
processManager
,
subprocessOutput:
false
,
subprocessOutput:
false
,
platform:
platform
,
platform:
platform
,
...
@@ -250,7 +250,7 @@ void main() {
...
@@ -250,7 +250,7 @@ void main() {
test
(
'throws when a command errors out'
,
()
async
{
test
(
'throws when a command errors out'
,
()
async
{
final
Map
<
String
,
List
<
ProcessResult
>>
calls
=
<
String
,
List
<
ProcessResult
>>{
final
Map
<
String
,
List
<
ProcessResult
>>
calls
=
<
String
,
List
<
ProcessResult
>>{
'git clone -b
dev
https://flutter.googlesource.com/mirrors/flutter'
:
'git clone -b
beta
https://flutter.googlesource.com/mirrors/flutter'
:
<
ProcessResult
>[
ProcessResult
(
0
,
0
,
'output1'
,
''
)],
<
ProcessResult
>[
ProcessResult
(
0
,
0
,
'output1'
,
''
)],
'git reset --hard
$testRef
'
:
<
ProcessResult
>[
ProcessResult
(
0
,
-
1
,
'output2'
,
''
)],
'git reset --hard
$testRef
'
:
<
ProcessResult
>[
ProcessResult
(
0
,
-
1
,
'output2'
,
''
)],
};
};
...
@@ -261,9 +261,9 @@ void main() {
...
@@ -261,9 +261,9 @@ void main() {
test
(
'non-strict mode calls the right commands'
,
()
async
{
test
(
'non-strict mode calls the right commands'
,
()
async
{
final
String
createBase
=
path
.
join
(
tempDir
.
absolute
.
path
,
'create_'
);
final
String
createBase
=
path
.
join
(
tempDir
.
absolute
.
path
,
'create_'
);
final
String
archiveName
=
path
.
join
(
tempDir
.
absolute
.
path
,
final
String
archiveName
=
path
.
join
(
tempDir
.
absolute
.
path
,
'flutter_
${platformName}
_v1.2.3-
dev
${platform.isLinux ? '.tar.xz' : '.zip'}
'
);
'flutter_
${platformName}
_v1.2.3-
beta
${platform.isLinux ? '.tar.xz' : '.zip'}
'
);
final
Map
<
String
,
List
<
ProcessResult
>?>
calls
=
<
String
,
List
<
ProcessResult
>?>{
final
Map
<
String
,
List
<
ProcessResult
>?>
calls
=
<
String
,
List
<
ProcessResult
>?>{
'git clone -b
dev
https://flutter.googlesource.com/mirrors/flutter'
:
null
,
'git clone -b
beta
https://flutter.googlesource.com/mirrors/flutter'
:
null
,
'git reset --hard
$testRef
'
:
null
,
'git reset --hard
$testRef
'
:
null
,
'git remote set-url origin https://github.com/flutter/flutter.git'
:
null
,
'git remote set-url origin https://github.com/flutter/flutter.git'
:
null
,
'git describe --tags --abbrev=0
$testRef
'
:
<
ProcessResult
>[
ProcessResult
(
0
,
0
,
'v1.2.3'
,
''
)],
'git describe --tags --abbrev=0
$testRef
'
:
<
ProcessResult
>[
ProcessResult
(
0
,
0
,
'v1.2.3'
,
''
)],
...
@@ -272,7 +272,7 @@ void main() {
...
@@ -272,7 +272,7 @@ void main() {
ProcessResult
(
0
,
0
,
'{"dartSdkVersion": "3.2.1"}'
,
''
),
ProcessResult
(
0
,
0
,
'{"dartSdkVersion": "3.2.1"}'
,
''
),
],
],
'
$dart
--version'
:
<
ProcessResult
>[
'
$dart
--version'
:
<
ProcessResult
>[
ProcessResult
(
0
,
0
,
'Dart SDK version: 2.17.0-63.0.
dev (dev
) (Wed Jan 26 03:48:52 2022 -0800) on "
${platformName}
_x64"'
,
''
),
ProcessResult
(
0
,
0
,
'Dart SDK version: 2.17.0-63.0.
beta (beta
) (Wed Jan 26 03:48:52 2022 -0800) on "
${platformName}
_x64"'
,
''
),
],
],
if
(
platform
.
isWindows
)
'7za x
${path.join(tempDir.path, 'mingit.zip')}
'
:
null
,
if
(
platform
.
isWindows
)
'7za x
${path.join(tempDir.path, 'mingit.zip')}
'
:
null
,
'
$flutter
doctor'
:
null
,
'
$flutter
doctor'
:
null
,
...
@@ -294,7 +294,7 @@ void main() {
...
@@ -294,7 +294,7 @@ void main() {
tempDir
,
tempDir
,
tempDir
,
tempDir
,
testRef
,
testRef
,
Branch
.
dev
,
Branch
.
beta
,
strict:
false
,
strict:
false
,
processManager:
processManager
,
processManager:
processManager
,
subprocessOutput:
false
,
subprocessOutput:
false
,
...
@@ -308,11 +308,11 @@ void main() {
...
@@ -308,11 +308,11 @@ void main() {
test
(
'fails if binary is not codesigned'
,
()
async
{
test
(
'fails if binary is not codesigned'
,
()
async
{
final
String
createBase
=
path
.
join
(
tempDir
.
absolute
.
path
,
'create_'
);
final
String
createBase
=
path
.
join
(
tempDir
.
absolute
.
path
,
'create_'
);
final
String
archiveName
=
path
.
join
(
tempDir
.
absolute
.
path
,
final
String
archiveName
=
path
.
join
(
tempDir
.
absolute
.
path
,
'flutter_
${platformName}
_v1.2.3-
dev
${platform.isLinux ? '.tar.xz' : '.zip'}
'
);
'flutter_
${platformName}
_v1.2.3-
beta
${platform.isLinux ? '.tar.xz' : '.zip'}
'
);
final
ProcessResult
codesignFailure
=
ProcessResult
(
1
,
1
,
''
,
'code object is not signed at all'
);
final
ProcessResult
codesignFailure
=
ProcessResult
(
1
,
1
,
''
,
'code object is not signed at all'
);
final
String
binPath
=
path
.
join
(
tempDir
.
path
,
'flutter'
,
'bin'
,
'cache'
,
'dart-sdk'
,
'bin'
,
'dart'
);
final
String
binPath
=
path
.
join
(
tempDir
.
path
,
'flutter'
,
'bin'
,
'cache'
,
'dart-sdk'
,
'bin'
,
'dart'
);
final
Map
<
String
,
List
<
ProcessResult
>?>
calls
=
<
String
,
List
<
ProcessResult
>?>{
final
Map
<
String
,
List
<
ProcessResult
>?>
calls
=
<
String
,
List
<
ProcessResult
>?>{
'git clone -b
dev
https://flutter.googlesource.com/mirrors/flutter'
:
null
,
'git clone -b
beta
https://flutter.googlesource.com/mirrors/flutter'
:
null
,
'git reset --hard
$testRef
'
:
null
,
'git reset --hard
$testRef
'
:
null
,
'git remote set-url origin https://github.com/flutter/flutter.git'
:
null
,
'git remote set-url origin https://github.com/flutter/flutter.git'
:
null
,
'git describe --tags --exact-match
$testRef
'
:
<
ProcessResult
>[
ProcessResult
(
0
,
0
,
'v1.2.3'
,
''
)],
'git describe --tags --exact-match
$testRef
'
:
<
ProcessResult
>[
ProcessResult
(
0
,
0
,
'v1.2.3'
,
''
)],
...
@@ -321,7 +321,7 @@ void main() {
...
@@ -321,7 +321,7 @@ void main() {
ProcessResult
(
0
,
0
,
'{"dartSdkVersion": "3.2.1"}'
,
''
),
ProcessResult
(
0
,
0
,
'{"dartSdkVersion": "3.2.1"}'
,
''
),
],
],
'
$dart
--version'
:
<
ProcessResult
>[
'
$dart
--version'
:
<
ProcessResult
>[
ProcessResult
(
0
,
0
,
'Dart SDK version: 2.17.0-63.0.
dev (dev
) (Wed Jan 26 03:48:52 2022 -0800) on "
${platformName}
_x64"'
,
''
),
ProcessResult
(
0
,
0
,
'Dart SDK version: 2.17.0-63.0.
beta (beta
) (Wed Jan 26 03:48:52 2022 -0800) on "
${platformName}
_x64"'
,
''
),
],
],
if
(
platform
.
isWindows
)
'7za x
${path.join(tempDir.path, 'mingit.zip')}
'
:
null
,
if
(
platform
.
isWindows
)
'7za x
${path.join(tempDir.path, 'mingit.zip')}
'
:
null
,
'
$flutter
doctor'
:
null
,
'
$flutter
doctor'
:
null
,
...
@@ -344,7 +344,7 @@ void main() {
...
@@ -344,7 +344,7 @@ void main() {
tempDir
,
tempDir
,
tempDir
,
tempDir
,
testRef
,
testRef
,
Branch
.
dev
,
Branch
.
beta
,
processManager:
processManager
,
processManager:
processManager
,
subprocessOutput:
false
,
subprocessOutput:
false
,
platform:
platform
,
platform:
platform
,
...
@@ -392,15 +392,15 @@ void main() {
...
@@ -392,15 +392,15 @@ void main() {
"base_url": "https://storage.googleapis.com/flutter_infra_release/releases",
"base_url": "https://storage.googleapis.com/flutter_infra_release/releases",
"current_release": {
"current_release": {
"beta": "3ea4d06340a97a1e9d7cae97567c64e0569dcaa2",
"beta": "3ea4d06340a97a1e9d7cae97567c64e0569dcaa2",
"
dev
": "5a58b36e36b8d7aace89d3950e6deb307956a6a0"
"
beta
": "5a58b36e36b8d7aace89d3950e6deb307956a6a0"
},
},
"releases": [
"releases": [
{
{
"hash": "5a58b36e36b8d7aace89d3950e6deb307956a6a0",
"hash": "5a58b36e36b8d7aace89d3950e6deb307956a6a0",
"channel": "
dev
",
"channel": "
beta
",
"version": "v0.2.3",
"version": "v0.2.3",
"release_date": "2018-03-20T01:47:02.851729Z",
"release_date": "2018-03-20T01:47:02.851729Z",
"archive": "
dev/
$platformName
/flutter_
${platformName}
_v0.2.3-dev
.zip",
"archive": "
beta/
$platformName
/flutter_
${platformName}
_v0.2.3-beta
.zip",
"sha256": "4fe85a822093e81cb5a66c7fc263f68de39b5797b294191b6d75e7afcc86aff8",
"sha256": "4fe85a822093e81cb5a66c7fc263f68de39b5797b294191b6d75e7afcc86aff8",
"dart_sdk_arch": "x64"
"dart_sdk_arch": "x64"
},
},
...
@@ -409,7 +409,7 @@ void main() {
...
@@ -409,7 +409,7 @@ void main() {
"channel": "beta",
"channel": "beta",
"version": "v0.2.2",
"version": "v0.2.2",
"release_date": "2018-03-16T18:48:13.375013Z",
"release_date": "2018-03-16T18:48:13.375013Z",
"archive": "
dev/
$platformName
/flutter_
${platformName}
_v0.2.2-dev
.zip",
"archive": "
beta/
$platformName
/flutter_
${platformName}
_v0.2.2-beta
.zip",
"sha256": "6073331168cdb37a4637a5dc073d6a7ef4e466321effa2c529fa27d2253a4d4b",
"sha256": "6073331168cdb37a4637a5dc073d6a7ef4e466321effa2c529fa27d2253a4d4b",
"dart_sdk_arch": "x64"
"dart_sdk_arch": "x64"
},
},
...
@@ -418,7 +418,7 @@ void main() {
...
@@ -418,7 +418,7 @@ void main() {
"channel": "stable",
"channel": "stable",
"version": "v0.0.0",
"version": "v0.0.0",
"release_date": "2018-03-20T01:47:02.851729Z",
"release_date": "2018-03-20T01:47:02.851729Z",
"archive": "stable/
$platformName
/flutter_
${platformName}
_v0.0.0-
dev
.zip",
"archive": "stable/
$platformName
/flutter_
${platformName}
_v0.0.0-
beta
.zip",
"sha256": "5dd34873b3a3e214a32fd30c2c319a0f46e608afb72f0d450b2d621a6d02aebd",
"sha256": "5dd34873b3a3e214a32fd30c2c319a0f46e608afb72f0d450b2d621a6d02aebd",
"dart_sdk_arch": "x64"
"dart_sdk_arch": "x64"
}
}
...
@@ -470,7 +470,7 @@ void main() {
...
@@ -470,7 +470,7 @@ void main() {
expect
(
contents
,
contains
(
'"hash": "5a58b36e36b8d7aace89d3950e6deb307956a6a0"'
));
expect
(
contents
,
contains
(
'"hash": "5a58b36e36b8d7aace89d3950e6deb307956a6a0"'
));
expect
(
contents
,
contains
(
'"hash": "b9bd51cc36b706215915711e580851901faebb40"'
));
expect
(
contents
,
contains
(
'"hash": "b9bd51cc36b706215915711e580851901faebb40"'
));
expect
(
contents
,
contains
(
'"channel": "beta"'
));
expect
(
contents
,
contains
(
'"channel": "beta"'
));
expect
(
contents
,
contains
(
'"channel": "
dev
"'
));
expect
(
contents
,
contains
(
'"channel": "
beta
"'
));
// Make sure old matching entries are removed.
// Make sure old matching entries are removed.
expect
(
contents
,
isNot
(
contains
(
'v0.0.0'
)));
expect
(
contents
,
isNot
(
contains
(
'v0.0.0'
)));
final
Map
<
String
,
dynamic
>
jsonData
=
json
.
decode
(
contents
)
as
Map
<
String
,
dynamic
>;
final
Map
<
String
,
dynamic
>
jsonData
=
json
.
decode
(
contents
)
as
Map
<
String
,
dynamic
>;
...
@@ -495,15 +495,15 @@ void main() {
...
@@ -495,15 +495,15 @@ void main() {
"base_url": "https://storage.googleapis.com/flutter_infra_release/releases",
"base_url": "https://storage.googleapis.com/flutter_infra_release/releases",
"current_release": {
"current_release": {
"beta": "3ea4d06340a97a1e9d7cae97567c64e0569dcaa2",
"beta": "3ea4d06340a97a1e9d7cae97567c64e0569dcaa2",
"
dev
": "5a58b36e36b8d7aace89d3950e6deb307956a6a0"
"
beta
": "5a58b36e36b8d7aace89d3950e6deb307956a6a0"
},
},
"releases": [
"releases": [
{
{
"hash": "5a58b36e36b8d7aace89d3950e6deb307956a6a0",
"hash": "5a58b36e36b8d7aace89d3950e6deb307956a6a0",
"channel": "
dev
",
"channel": "
beta
",
"version": "v0.2.3",
"version": "v0.2.3",
"release_date": "2018-03-20T01:47:02.851729Z",
"release_date": "2018-03-20T01:47:02.851729Z",
"archive": "
dev/
$platformName
/flutter_
${platformName}
_v0.2.3-dev
.zip",
"archive": "
beta/
$platformName
/flutter_
${platformName}
_v0.2.3-beta
.zip",
"sha256": "4fe85a822093e81cb5a66c7fc263f68de39b5797b294191b6d75e7afcc86aff8"
"sha256": "4fe85a822093e81cb5a66c7fc263f68de39b5797b294191b6d75e7afcc86aff8"
},
},
{
{
...
@@ -511,7 +511,7 @@ void main() {
...
@@ -511,7 +511,7 @@ void main() {
"channel": "beta",
"channel": "beta",
"version": "v0.2.2",
"version": "v0.2.2",
"release_date": "2018-03-16T18:48:13.375013Z",
"release_date": "2018-03-16T18:48:13.375013Z",
"archive": "
dev/
$platformName
/flutter_
${platformName}
_v0.2.2-dev
.zip",
"archive": "
beta/
$platformName
/flutter_
${platformName}
_v0.2.2-beta
.zip",
"sha256": "6073331168cdb37a4637a5dc073d6a7ef4e466321effa2c529fa27d2253a4d4b"
"sha256": "6073331168cdb37a4637a5dc073d6a7ef4e466321effa2c529fa27d2253a4d4b"
},
},
{
{
...
@@ -519,7 +519,7 @@ void main() {
...
@@ -519,7 +519,7 @@ void main() {
"channel": "stable",
"channel": "stable",
"version": "v0.0.0",
"version": "v0.0.0",
"release_date": "2018-03-20T01:47:02.851729Z",
"release_date": "2018-03-20T01:47:02.851729Z",
"archive": "stable/
$platformName
/flutter_
${platformName}
_v0.0.0-
dev
.zip",
"archive": "stable/
$platformName
/flutter_
${platformName}
_v0.0.0-
beta
.zip",
"sha256": "5dd34873b3a3e214a32fd30c2c319a0f46e608afb72f0d450b2d621a6d02aebd"
"sha256": "5dd34873b3a3e214a32fd30c2c319a0f46e608afb72f0d450b2d621a6d02aebd"
}
}
]
]
...
@@ -574,7 +574,7 @@ void main() {
...
@@ -574,7 +574,7 @@ void main() {
"base_url": "https://storage.googleapis.com/flutter_infra_release/releases",
"base_url": "https://storage.googleapis.com/flutter_infra_release/releases",
"current_release": {
"current_release": {
"beta": "3ea4d06340a97a1e9d7cae97567c64e0569dcaa2",
"beta": "3ea4d06340a97a1e9d7cae97567c64e0569dcaa2",
"
dev
": "5a58b36e36b8d7aace89d3950e6deb307956a6a0"
"
beta
": "5a58b36e36b8d7aace89d3950e6deb307956a6a0"
},
},
"releases": [
"releases": [
{
{
...
@@ -582,7 +582,7 @@ void main() {
...
@@ -582,7 +582,7 @@ void main() {
"channel": "stable",
"channel": "stable",
"version": "v1.2.3",
"version": "v1.2.3",
"release_date": "2018-03-20T01:47:02.851729Z",
"release_date": "2018-03-20T01:47:02.851729Z",
"archive": "
dev/
$platformName
/flutter_
${platformName}
_v0.2.3-dev
.zip",
"archive": "
beta/
$platformName
/flutter_
${platformName}
_v0.2.3-beta
.zip",
"sha256": "4fe85a822093e81cb5a66c7fc263f68de39b5797b294191b6d75e7afcc86aff8",
"sha256": "4fe85a822093e81cb5a66c7fc263f68de39b5797b294191b6d75e7afcc86aff8",
"dart_sdk_arch": "x64"
"dart_sdk_arch": "x64"
}
}
...
@@ -639,15 +639,15 @@ void main() {
...
@@ -639,15 +639,15 @@ void main() {
"base_url": "https://storage.googleapis.com/flutter_infra_release/releases",
"base_url": "https://storage.googleapis.com/flutter_infra_release/releases",
"current_release": {
"current_release": {
"beta": "3ea4d06340a97a1e9d7cae97567c64e0569dcaa2",
"beta": "3ea4d06340a97a1e9d7cae97567c64e0569dcaa2",
"
dev
": "5a58b36e36b8d7aace89d3950e6deb307956a6a0"
"
beta
": "5a58b36e36b8d7aace89d3950e6deb307956a6a0"
},
},
"releases": [
"releases": [
{
{
"hash": "5a58b36e36b8d7aace89d3950e6deb307956a6a0",
"hash": "5a58b36e36b8d7aace89d3950e6deb307956a6a0",
"channel": "
dev
",
"channel": "
beta
",
"version": "v0.2.3",
"version": "v0.2.3",
"release_date": "2018-03-20T01:47:02.851729Z",
"release_date": "2018-03-20T01:47:02.851729Z",
"archive": "
dev/
$platformName
/flutter_
${platformName}
_v0.2.3-dev
.zip",
"archive": "
beta/
$platformName
/flutter_
${platformName}
_v0.2.3-beta
.zip",
"sha256": "4fe85a822093e81cb5a66c7fc263f68de39b5797b294191b6d75e7afcc86aff8"
"sha256": "4fe85a822093e81cb5a66c7fc263f68de39b5797b294191b6d75e7afcc86aff8"
},
},
{
{
...
@@ -655,7 +655,7 @@ void main() {
...
@@ -655,7 +655,7 @@ void main() {
"channel": "beta",
"channel": "beta",
"version": "v0.2.2",
"version": "v0.2.2",
"release_date": "2018-03-16T18:48:13.375013Z",
"release_date": "2018-03-16T18:48:13.375013Z",
"archive": "
dev/
$platformName
/flutter_
${platformName}
_v0.2.2-dev
.zip",
"archive": "
beta/
$platformName
/flutter_
${platformName}
_v0.2.2-beta
.zip",
"sha256": "6073331168cdb37a4637a5dc073d6a7ef4e466321effa2c529fa27d2253a4d4b"
"sha256": "6073331168cdb37a4637a5dc073d6a7ef4e466321effa2c529fa27d2253a4d4b"
},
},
{
{
...
@@ -663,7 +663,7 @@ void main() {
...
@@ -663,7 +663,7 @@ void main() {
"channel": "stable",
"channel": "stable",
"version": "v0.0.0",
"version": "v0.0.0",
"release_date": "2018-03-20T01:47:02.851729Z",
"release_date": "2018-03-20T01:47:02.851729Z",
"archive": "stable/
$platformName
/flutter_
${platformName}
_v0.0.0-
dev
.zip",
"archive": "stable/
$platformName
/flutter_
${platformName}
_v0.0.0-
beta
.zip",
"sha256": "5dd34873b3a3e214a32fd30c2c319a0f46e608afb72f0d450b2d621a6d02aebd"
"sha256": "5dd34873b3a3e214a32fd30c2c319a0f46e608afb72f0d450b2d621a6d02aebd"
}
}
]
]
...
@@ -761,15 +761,15 @@ void main() {
...
@@ -761,15 +761,15 @@ void main() {
"base_url": "https://storage.googleapis.com/flutter_infra_release/releases",
"base_url": "https://storage.googleapis.com/flutter_infra_release/releases",
"current_release": {
"current_release": {
"beta": "3ea4d06340a97a1e9d7cae97567c64e0569dcaa2",
"beta": "3ea4d06340a97a1e9d7cae97567c64e0569dcaa2",
"
dev
": "5a58b36e36b8d7aace89d3950e6deb307956a6a0"
"
beta
": "5a58b36e36b8d7aace89d3950e6deb307956a6a0"
},
},
"releases": [
"releases": [
{
{
"hash": "5a58b36e36b8d7aace89d3950e6deb307956a6a0",
"hash": "5a58b36e36b8d7aace89d3950e6deb307956a6a0",
"channel": "
dev
",
"channel": "
beta
",
"version": "v0.2.3",
"version": "v0.2.3",
"release_date": "2018-03-20T01:47:02.851729Z",
"release_date": "2018-03-20T01:47:02.851729Z",
"archive": "
dev/
$platformName
/flutter_
${platformName}
_v0.2.3-dev
.zip",
"archive": "
beta/
$platformName
/flutter_
${platformName}
_v0.2.3-beta
.zip",
"sha256": "4fe85a822093e81cb5a66c7fc263f68de39b5797b294191b6d75e7afcc86aff8"
"sha256": "4fe85a822093e81cb5a66c7fc263f68de39b5797b294191b6d75e7afcc86aff8"
},
},
{
{
...
@@ -777,7 +777,7 @@ void main() {
...
@@ -777,7 +777,7 @@ void main() {
"channel": "beta",
"channel": "beta",
"version": "v0.2.2",
"version": "v0.2.2",
"release_date": "2018-03-16T18:48:13.375013Z",
"release_date": "2018-03-16T18:48:13.375013Z",
"archive": "
dev/
$platformName
/flutter_
${platformName}
_v0.2.2-dev
.zip",
"archive": "
beta/
$platformName
/flutter_
${platformName}
_v0.2.2-beta
.zip",
"sha256": "6073331168cdb37a4637a5dc073d6a7ef4e466321effa2c529fa27d2253a4d4b"
"sha256": "6073331168cdb37a4637a5dc073d6a7ef4e466321effa2c529fa27d2253a4d4b"
},
},
{
{
...
@@ -785,7 +785,7 @@ void main() {
...
@@ -785,7 +785,7 @@ void main() {
"channel": "stable",
"channel": "stable",
"version": "v0.0.0",
"version": "v0.0.0",
"release_date": "2018-03-20T01:47:02.851729Z",
"release_date": "2018-03-20T01:47:02.851729Z",
"archive": "stable/
$platformName
/flutter_
${platformName}
_v0.0.0-
dev
.zip",
"archive": "stable/
$platformName
/flutter_
${platformName}
_v0.0.0-
beta
.zip",
"sha256": "5dd34873b3a3e214a32fd30c2c319a0f46e608afb72f0d450b2d621a6d02aebd"
"sha256": "5dd34873b3a3e214a32fd30c2c319a0f46e608afb72f0d450b2d621a6d02aebd"
}
}
]
]
...
...
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