-
Notifications
You must be signed in to change notification settings - Fork 147
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
feat(shorebird_cli): add ability to release with --no-codesign
#1267
Merged
Merged
Changes from 16 commits
Commits
Show all changes
18 commits
Select commit
Hold shift + click to select a range
e5d7fd2
Use xcarchives instead of ipas
bryanoltman 034f4d3
fix tests
bryanoltman 95ff927
Merge branch 'main' into bo/xcarchive
bryanoltman 41aff17
fix windows tests
bryanoltman d7f68b0
Coverage
bryanoltman 9ee590c
Merge branch 'main' into bo/xcarchive
bryanoltman 73b6ed0
cleanup
bryanoltman 08b0f60
thin xcarchives before upload
bryanoltman 4ca14f6
add codesign flag to iOS patch command
bryanoltman 48699b1
Merge branch 'main' into bo/xcarchive
bryanoltman ed9cc5b
Add warning about shorebird preview
bryanoltman ba3d5d4
fix warning message
bryanoltman 5b52feb
wording tweak
bryanoltman f1fb12b
delay logging success
bryanoltman 6886f75
cleanup
bryanoltman eec483f
coverage
bryanoltman 7e2c0af
Update packages/shorebird_cli/lib/src/commands/release/release_ios_co…
bryanoltman 022bc17
Merge branch 'main' into bo/xcarchive
bryanoltman 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 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 |
---|---|---|
@@ -0,0 +1 @@ | ||
export 'directory_archive.dart'; |
19 changes: 19 additions & 0 deletions
19
packages/shorebird_cli/lib/src/archive/directory_archive.dart
This file contains 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 |
---|---|---|
@@ -0,0 +1,19 @@ | ||
import 'dart:isolate'; | ||
|
||
import 'package:archive/archive_io.dart'; | ||
import 'package:io/io.dart'; | ||
import 'package:path/path.dart' as p; | ||
import 'package:shorebird_cli/src/third_party/flutter_tools/lib/flutter_tools.dart'; | ||
|
||
extension DirectoryArchive on Directory { | ||
/// Copies this directory to a temporary directory and zips it. | ||
Future<File> zipToTempFile() async { | ||
final tempDir = await Directory.systemTemp.createTemp(); | ||
final outFile = File(p.join(tempDir.path, '${p.basename(path)}.zip')); | ||
await Isolate.run(() { | ||
copyPathSync(path, tempDir.path); | ||
ZipFileEncoder().zipDirectory(tempDir, filename: outFile.path); | ||
}); | ||
return outFile; | ||
} | ||
} |
2 changes: 1 addition & 1 deletion
2
packages/shorebird_cli/lib/src/archive_analysis/archive_analysis.dart
This file contains 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 |
---|---|---|
@@ -1,4 +1,4 @@ | ||
export 'android_archive_differ.dart'; | ||
export 'file_set_diff.dart'; | ||
export 'ios_archive_differ.dart'; | ||
export 'ipa.dart'; | ||
export 'plist.dart'; |
This file contains 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 was deleted.
Oops, something went wrong.
47 changes: 47 additions & 0 deletions
47
packages/shorebird_cli/lib/src/archive_analysis/plist.dart
This file contains 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 |
---|---|---|
@@ -0,0 +1,47 @@ | ||
import 'dart:io'; | ||
|
||
import 'package:propertylistserialization/propertylistserialization.dart'; | ||
|
||
class Plist { | ||
Plist({required File file}) { | ||
properties = PropertyListSerialization.propertyListWithString( | ||
file.readAsStringSync(), | ||
) as Map<String, Object>; | ||
} | ||
|
||
/// This key is a user-visible string for the version of the bundle. The | ||
/// required format is three period-separated integers, such as 10.14.1. The | ||
/// string can only contain numeric characters (0-9) and periods. | ||
/// | ||
/// See https://developer.apple.com/documentation/bundleresources/information_property_list/cfbundleshortversionstring | ||
static const releaseVersionKey = 'CFBundleShortVersionString'; | ||
|
||
/// The version of the build that identifies an iteration of the bundle. | ||
/// | ||
/// See https://developer.apple.com/documentation/bundleresources/information_property_list/cfbundleversion | ||
static const buildNumberKey = 'CFBundleVersion'; | ||
|
||
/// The Info.plist contained in .xcarchives has the following structure: | ||
/// { | ||
/// ApplicationProperties: { | ||
/// CFBundleShortVersionString: "1.0.0", | ||
/// CFBundleVersion: "1", | ||
/// }, | ||
static const applicationPropertiesKey = 'ApplicationProperties'; | ||
|
||
late final Map<String, Object> properties; | ||
|
||
String get versionNumber { | ||
final applicationProperties = | ||
properties[applicationPropertiesKey]! as Map<String, Object>; | ||
final releaseVersion = applicationProperties[releaseVersionKey] as String?; | ||
final buildNumber = applicationProperties[buildNumberKey] as String?; | ||
if (releaseVersion == null) { | ||
throw Exception('Could not determine release version'); | ||
} | ||
|
||
return buildNumber == null | ||
? releaseVersion | ||
: '$releaseVersion+$buildNumber'; | ||
} | ||
} |
This file contains 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.
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.
💯