Skip to content

Commit 7a870d5

Browse files
committed
Download dynamic library for sqlciper tests
1 parent b75cfb9 commit 7a870d5

File tree

1 file changed

+5
-1
lines changed

1 file changed

+5
-1
lines changed

scripts/init_powersync_core_binary.dart

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -11,6 +11,7 @@ final sqliteUrl =
1111
void main() async {
1212
final sqliteCoreFilename = getLibraryForPlatform();
1313
final powersyncPath = "packages/powersync_core";
14+
final powersyncCipherPath = "packages/powersync_sqlcipher";
1415
final sqliteCorePath = '$powersyncPath/$sqliteCoreFilename';
1516

1617
// Download dynamic library
@@ -23,9 +24,12 @@ void main() async {
2324
if (await originalFile.exists()) {
2425
try {
2526
// Rename the original file to the new file name
26-
await originalFile.rename("$powersyncPath/$newFileName");
27+
final renamedFile =
28+
await originalFile.rename("$powersyncPath/$newFileName");
2729
print(
2830
'File renamed successfully from $sqliteCoreFilename to $newFileName');
31+
await renamedFile.copy("$powersyncCipherPath/$newFileName");
32+
print('$newFileName copied to $powersyncCipherPath');
2933
} catch (e) {
3034
throw IOException('Error renaming file: $e');
3135
}

0 commit comments

Comments
 (0)