Skip to content

Commit

Permalink
prune manifest
Browse files Browse the repository at this point in the history
  • Loading branch information
wiegell committed Nov 23, 2022
1 parent 9c6bfa5 commit b3b1282
Show file tree
Hide file tree
Showing 2 changed files with 11 additions and 4 deletions.
9 changes: 6 additions & 3 deletions cli5/Program.cs
Original file line number Diff line number Diff line change
Expand Up @@ -14,10 +14,12 @@ static void Main(string[] args)
{
UpdateManifest manifest = readFromFile();

regPreRelease(manifest);
bool preRelease = args.Length == 1 && args[0] == "-p";
Console.WriteLine("isPrerelease: " + preRelease);
regRelease(manifest, preRelease);
}

static void regPreRelease(UpdateManifest manifest)
static void regRelease(UpdateManifest manifest, bool isPrerelease)
{
string gitStatus = runCommandReturnOutput("git status");
bool cleanTree = gitStatus.Contains("nothing to commit, working tree clean");
Expand Down Expand Up @@ -79,7 +81,8 @@ static void regPreRelease(UpdateManifest manifest)

// Upload release
Console.WriteLine("Uploading release to gh");
string uploadres = runCommand($"gh release create --generate-notes {newTagShort} ./AstroWall/bin/Package/Astro.pkg ./AstroWall/bin/Dmg/Astro.dmg");
string preRelStr = isPrerelease ? " -p" : "";
string uploadres = runCommand($"gh release create{preRelStr} --generate-notes {newTagShort} ./AstroWall/bin/Package/Astro.pkg ./AstroWall/bin/Dmg/Astro.dmg");
Console.WriteLine("Upload res:\n" + uploadres);

// Push manifest
Expand Down
6 changes: 5 additions & 1 deletion docs/assets/manifest.json
Original file line number Diff line number Diff line change
@@ -1 +1,5 @@
{"warning":null,"Releases":[{"version":"0.0.1-alpha-riotenrti","ReleaseDate":"2022-11-03T22:57:17.580522+01:00","DirectPKGurl":"https://github.com/wiegell/AstroWall/releases/download/v0.0.2-alpha/Astro.pkg","Description":"First on update manifest","isPreRelease":true},{"version":"0.0.1-alpha-riotenrti","ReleaseDate":"2022-11-03T22:57:17.580522+01:00","DirectPKGurl":"https://github.com/wiegell/AstroWall/releases/download/v0.0.2-alpha/Astro.pkg","Description":"First on update manifest","isPreRelease":true}],"PreReleases":[{"version":"v0.0.14-alpha","ReleaseDate":"2022-11-04T12:45:59.14125+01:00","DirectPKGurl":"https://github.com/wiegell/AstroWall/releases/download/v0.0.14-alpha/Astro.pkg","Description":"Lorem Ipsum","isPreRelease":true},{"version":"v0.0.15-alpha","ReleaseDate":"2022-11-04T12:48:12.435167+01:00","DirectPKGurl":"https://github.com/wiegell/AstroWall/releases/download/v0.0.15-alpha/Astro.pkg","Description":"Lorem Ipsum","isPreRelease":true},{"version":"v0.0.16-alpha","ReleaseDate":"2022-11-04T12:49:37.399744+01:00","DirectPKGurl":"https://github.com/wiegell/AstroWall/releases/download/v0.0.16-alpha/Astro.pkg","Description":"Lorem Ipsum","isPreRelease":true},{"version":"v0.0.17-alpha","ReleaseDate":"2022-11-07T13:12:33.132613+01:00","DirectPKGurl":"https://github.com/wiegell/AstroWall/releases/download/v0.0.17-alpha/Astro.pkg","Description":"Lorem Ipsum","isPreRelease":true},{"version":"v0.0.19-alpha","ReleaseDate":"2022-11-08T23:37:06.559153+01:00","DirectPKGurl":"https://github.com/wiegell/AstroWall/releases/download/v0.0.19-alpha/Astro.pkg","Description":"Lorem Ipsum","isPreRelease":true},{"version":"v0.0.20-alpha","ReleaseDate":"2022-11-10T14:34:11.413328+01:00","DirectPKGurl":"https://github.com/wiegell/AstroWall/releases/download/v0.0.20-alpha/Astro.pkg","Description":"Lorem Ipsum","isPreRelease":true},{"version":"v0.0.21-alpha","ReleaseDate":"2022-11-10T19:37:43.42355+01:00","DirectPKGurl":"https://github.com/wiegell/AstroWall/releases/download/v0.0.21-alpha/Astro.pkg","Description":"Lorem Ipsum","isPreRelease":true},{"version":"v0.0.22-alpha","ReleaseDate":"2022-11-10T19:46:26.421984+01:00","DirectPKGurl":"https://github.com/wiegell/AstroWall/releases/download/v0.0.22-alpha/Astro.pkg","Description":"Lorem Ipsum","isPreRelease":true},{"version":"v0.0.23-alpha","ReleaseDate":"2022-11-10T19:46:59.018741+01:00","DirectPKGurl":"https://github.com/wiegell/AstroWall/releases/download/v0.0.23-alpha/Astro.pkg","Description":"Lorem Ipsum","isPreRelease":true},{"version":"v0.0.24-alpha","ReleaseDate":"2022-11-10T20:07:34.418653+01:00","DirectPKGurl":"https://github.com/wiegell/AstroWall/releases/download/v0.0.24-alpha/Astro.pkg","Description":"Lorem Ipsum","isPreRelease":true},{"version":"v0.0.25-alpha","ReleaseDate":"2022-11-10T20:07:59.118694+01:00","DirectPKGurl":"https://github.com/wiegell/AstroWall/releases/download/v0.0.25-alpha/Astro.pkg","Description":"Lorem Ipsum","isPreRelease":true},{"version":"v0.0.27-alpha","ReleaseDate":"2022-11-10T21:02:46.416922+01:00","DirectPKGurl":"https://github.com/wiegell/AstroWall/releases/download/v0.0.27-alpha/Astro.pkg","Description":"Lorem Ipsum","isPreRelease":true},{"version":"v0.0.28-alpha","ReleaseDate":"2022-11-10T22:13:58.808504+01:00","DirectPKGurl":"https://github.com/wiegell/AstroWall/releases/download/v0.0.28-alpha/Astro.pkg","Description":"Lorem Ipsum","isPreRelease":true},{"version":"v0.0.29-alpha","ReleaseDate":"2022-11-10T22:56:06.150069+01:00","DirectPKGurl":"https://github.com/wiegell/AstroWall/releases/download/v0.0.29-alpha/Astro.pkg","Description":"Lorem Ipsum","isPreRelease":true},{"version":"v0.0.31-alpha","ReleaseDate":"2022-11-14T10:03:57.472749+01:00","DirectPKGurl":"https://github.com/wiegell/AstroWall/releases/download/v0.0.31-alpha/Astro.pkg","Description":"Lorem Ipsum","isPreRelease":true},{"version":"v0.0.33-alpha","ReleaseDate":"2022-11-14T10:33:10.839476+01:00","DirectPKGurl":"https://github.com/wiegell/AstroWall/releases/download/v0.0.33-alpha/Astro.pkg","Description":"Lorem Ipsum","isPreRelease":true},{"version":"v0.0.34-alpha","ReleaseDate":"2022-11-14T10:35:14.750378+01:00","DirectPKGurl":"https://github.com/wiegell/AstroWall/releases/download/v0.0.34-alpha/Astro.pkg","Description":"Lorem Ipsum","isPreRelease":true},{"version":"v0.0.36-alpha","ReleaseDate":"2022-11-14T10:40:31.312702+01:00","DirectPKGurl":"https://github.com/wiegell/AstroWall/releases/download/v0.0.36-alpha/Astro.pkg","Description":"Lorem Ipsum","isPreRelease":true},{"version":"v0.0.38-alpha","ReleaseDate":"2022-11-16T23:30:43.155114+01:00","DirectPKGurl":"https://github.com/wiegell/AstroWall/releases/download/v0.0.38-alpha/Astro.pkg","Description":"Lorem Ipsum","isPreRelease":true},{"version":"v0.0.42-alpha","ReleaseDate":"2022-11-21T11:24:56.547973+01:00","DirectPKGurl":"https://github.com/wiegell/AstroWall/releases/download/v0.0.42-alpha/Astro.pkg","Description":"Lorem Ipsum","isPreRelease":true},{"version":"v0.1.1-alpha","ReleaseDate":"2022-11-21T14:13:02.667083+01:00","DirectPKGurl":"https://github.com/wiegell/AstroWall/releases/download/v0.1.1-alpha/Astro.pkg","Description":"Lorem Ipsum","isPreRelease":true},{"version":"v0.1.2-alpha","ReleaseDate":"2022-11-21T14:23:04.1359+01:00","DirectPKGurl":"https://github.com/wiegell/AstroWall/releases/download/v0.1.2-alpha/Astro.pkg","Description":"Lorem Ipsum","isPreRelease":true},{"version":"v0.1.4-alpha","ReleaseDate":"2022-11-21T21:12:56.00595+01:00","DirectPKGurl":"https://github.com/wiegell/AstroWall/releases/download/v0.1.4-alpha/Astro.pkg","Description":"Lorem Ipsum","isPreRelease":true},{"version":"v0.1.6-alpha","ReleaseDate":"2022-11-23T14:34:02.11942+01:00","DirectPKGurl":"https://github.com/wiegell/AstroWall/releases/download/v0.1.6-alpha/Astro.pkg","Description":"Lorem Ipsum","isPreRelease":true},{"version":"output","ReleaseDate":"2022-11-23T16:06:59.7403+01:00","DirectPKGurl":"https://github.com/wiegell/AstroWall/releases/download/output-alpha/Astro.pkg","Description":"Lorem Ipsum","isPreRelease":true},{"version":"output","ReleaseDate":"2022-11-23T16:09:06.037156+01:00","DirectPKGurl":"https://github.com/wiegell/AstroWall/releases/download/output-alpha/Astro.pkg","Description":"Lorem Ipsum","isPreRelease":true},{"version":"output","ReleaseDate":"2022-11-23T16:11:52.044695+01:00","DirectPKGurl":"https://github.com/wiegell/AstroWall/releases/download/1-alpha/Astro.pkg","Description":"Lorem Ipsum","isPreRelease":true},{"version":"2-alpha","ReleaseDate":"2022-11-23T16:12:55.040732+01:00","DirectPKGurl":"https://github.com/wiegell/AstroWall/releases/download/2-alpha/Astro.pkg","Description":"Lorem Ipsum","isPreRelease":true},{"version":"v0.1.9-alpha","ReleaseDate":"2022-11-23T16:14:01.037002+01:00","DirectPKGurl":"https://github.com/wiegell/AstroWall/releases/download/v0.1.9-alpha/Astro.pkg","Description":"Lorem Ipsum","isPreRelease":true}]}
{
"warning": null,
"Releases": [],
"PreReleases": []
}

0 comments on commit b3b1282

Please sign in to comment.