Skip to content

Commit

Permalink
release/0.2.0 (#14)
Browse files Browse the repository at this point in the history
  • Loading branch information
yardexx authored Feb 10, 2023
1 parent 35a2a9e commit 1aed698
Show file tree
Hide file tree
Showing 7 changed files with 33 additions and 8 deletions.
9 changes: 9 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,3 +1,12 @@
# 0.2.0
Version update and bug fixes.

## 🎯 Improvements
- Added compatibility for freeRASP 4.0.0

## 🛠 Fixed issues
- Post-script failed when scheme update were set to false

# 0.1.0
**🎉 First release on BrickHub.dev! 🎉**

Expand Down
2 changes: 1 addition & 1 deletion __brick__/lib/freerasp/freerasp.g.dart
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ TalsecConfig _config = TalsecConfig(
watcherMail: '{{watcher_mail}}',{{#android}}
androidConfig: AndroidConfig(
expectedPackageName: '{{package_name}}',
expectedSigningCertificateHash: '{{signing_hash}}',
expectedSigningCertificateHashes: {{{signing_hashes}}},
),{{/android}}{{#ios}}
iosConfig: IOSconfig(
appBundleId: '{{bundle_id}}',
Expand Down
4 changes: 2 additions & 2 deletions brick.yaml
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
name: freerasp_brick
description: A brick for configuration generation and automatic setup for freeRASP.

version: 0.1.0
repository: https://github.com/yardexx/freerasp_brick
version: 0.2.0

environment:
mason: ">=0.1.0-dev.39 <0.1.0"
Expand Down
2 changes: 1 addition & 1 deletion hooks/analysis_options.yaml
Original file line number Diff line number Diff line change
@@ -1 +1 @@
include: package:very_good_analysis/analysis_options.3.0.1.yaml
include: package:very_good_analysis/analysis_options.3.1.0.yaml
10 changes: 10 additions & 0 deletions hooks/extensions.dart
Original file line number Diff line number Diff line change
Expand Up @@ -24,3 +24,13 @@ extension LoggerX on Logger {
);
}
}

extension StringX on String {
String toListString() {
return split(',')
.map((item) => item.trim())
.map((item) => "'$item'")
.toList()
.toString();
}
}
9 changes: 7 additions & 2 deletions hooks/post_gen.dart
Original file line number Diff line number Diff line change
Expand Up @@ -10,11 +10,16 @@ const String flutterBuild = 'lib';

Future<void> run(HookContext context) async {
final logger = context.logger;

final isAndroid = context.vars['android'] as bool;
final isIOS = context.vars['ios'] as bool;

await _runPubAdd(logger);
await _runPubGet(logger);
await _runDartFix(logger);
await _runGradleCheck(context);
await _runSchemeCheck(context);

if (isAndroid) await _runGradleCheck(context);
if (isIOS) await _runSchemeCheck(context);
}

Future<void> _runPubAdd(Logger logger) async {
Expand Down
5 changes: 3 additions & 2 deletions hooks/pre_gen.dart
Original file line number Diff line number Diff line change
Expand Up @@ -47,7 +47,8 @@ void parseAndroidData(HookContext context) {
defaultValue: defaultAppPackage,
);

final signingHash = logger.masonPrompt("What's app singing hash?");
final signingHashes =
logger.masonPrompt('What are app singing hashes?').toListString();

final updateGradle = logger.masonConfirm(
'Do you want to check and update API level (minSdkVersion)?',
Expand All @@ -56,7 +57,7 @@ void parseAndroidData(HookContext context) {

context.vars.addAll({
'package_name': packageName,
'signing_hash': signingHash,
'signing_hashes': signingHashes,
'update_gradle': updateGradle,
});
}

0 comments on commit 1aed698

Please sign in to comment.