Use a submodule for gomuks source
This commit is contained in:
parent
d3e6340b28
commit
fe845e6cd6
6 changed files with 31 additions and 67 deletions
|
|
@ -3,39 +3,7 @@ import "package:ffigen/ffigen.dart";
|
|||
import "package:path/path.dart";
|
||||
|
||||
void main(List<String> args) async {
|
||||
final repoDir = Directory.fromUri(
|
||||
Platform.script.resolve("../src/gomuks/source"),
|
||||
);
|
||||
if (await repoDir.exists()) await repoDir.delete(recursive: true);
|
||||
await repoDir.create(recursive: true);
|
||||
|
||||
print("Cloning Gomuks repository...");
|
||||
final cloneResult = await Process.run("git", [
|
||||
"clone",
|
||||
"https://github.com/zachatrocity/gomuks",
|
||||
repoDir.path,
|
||||
]);
|
||||
|
||||
if (cloneResult.exitCode != 0) {
|
||||
throw Exception(
|
||||
"Failed to clone Gomuks repository: \n${cloneResult.stderr}",
|
||||
);
|
||||
}
|
||||
|
||||
final commit = await File.fromUri(
|
||||
Platform.script.resolve("../gomuks.lock"),
|
||||
).readAsString();
|
||||
|
||||
final checkoutResult = await Process.run("git", [
|
||||
"checkout",
|
||||
commit,
|
||||
], workingDirectory: repoDir.path);
|
||||
|
||||
if (checkoutResult.exitCode != 0) {
|
||||
throw Exception(
|
||||
"Failed to check out locked commit: \n${checkoutResult.stderr}",
|
||||
);
|
||||
}
|
||||
final repoDir = Directory.fromUri(Platform.script.resolve("../gomuks"));
|
||||
|
||||
print("Generating FFI Bindings...");
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue