made python s3cmd the standart across all os
This commit is contained in:
parent
083c412177
commit
b1c6aeb9ab
|
@ -17,22 +17,7 @@ public static class InstallationMethods
|
||||||
//secret 55MAqyO_FqUmh7O64VIO0egq50ERn_WIAWuc2QC44QU
|
//secret 55MAqyO_FqUmh7O64VIO0egq50ERn_WIAWuc2QC44QU
|
||||||
const String apiKey = "EXO44d2979c8e570eae81ead564";
|
const String apiKey = "EXO44d2979c8e570eae81ead564";
|
||||||
const String salt = "3e5b3069-214a-43ee-8d85-57d72000c19d";
|
const String salt = "3e5b3069-214a-43ee-8d85-57d72000c19d";
|
||||||
if (Environment.OSVersion.Platform != PlatformID.Unix)
|
var cmd = Cli
|
||||||
{
|
|
||||||
var cmd = Cli
|
|
||||||
.Wrap("s3cmd")
|
|
||||||
.WithArguments(new[]
|
|
||||||
{
|
|
||||||
"signurl", $"s3://{installation.Id}-{salt}", validity.TotalSeconds.ToString(), "--access_key",
|
|
||||||
apiKey
|
|
||||||
});
|
|
||||||
|
|
||||||
var x = await cmd.ExecuteBufferedAsync();
|
|
||||||
installation.S3Url = x.StandardOutput.Replace("\n", "").Replace(" ", "");
|
|
||||||
}
|
|
||||||
else
|
|
||||||
{
|
|
||||||
var cmd = Cli
|
|
||||||
.Wrap("python3")
|
.Wrap("python3")
|
||||||
.WithArguments(new[]
|
.WithArguments(new[]
|
||||||
{
|
{
|
||||||
|
@ -41,9 +26,8 @@ public static class InstallationMethods
|
||||||
});
|
});
|
||||||
var x = await cmd.ExecuteBufferedAsync();
|
var x = await cmd.ExecuteBufferedAsync();
|
||||||
installation.S3Url = x.StandardOutput.Replace("\n", "").Replace(" ", "");
|
installation.S3Url = x.StandardOutput.Replace("\n", "").Replace(" ", "");
|
||||||
}
|
|
||||||
|
|
||||||
Console.WriteLine(installation.S3Url);
|
Console.WriteLine(installation.S3Url);
|
||||||
|
|
||||||
Db.Update(installation);
|
Db.Update(installation);
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue