From e93d1a15219cf4022abf815c65a795e5bac4f7ce Mon Sep 17 00:00:00 2001 From: BWiegell Date: Wed, 23 Nov 2022 14:33:45 +0100 Subject: [PATCH] reactivate build script --- AstroWall/Info.plist | 66 ++++++++++++++++++------------------- cli5/Program.cs | 78 ++++++++++++++++++++++---------------------- 2 files changed, 72 insertions(+), 72 deletions(-) diff --git a/AstroWall/Info.plist b/AstroWall/Info.plist index 1c5daec..636a769 100644 --- a/AstroWall/Info.plist +++ b/AstroWall/Info.plist @@ -1,36 +1,36 @@ - - CFBundleName - Astro Wall - CFBundleIdentifier - com.astro.wall.Astro-Wall - CFBundleShortVersionString - 0.1.3 - CFBundleVersion - 0.1.3-alpha-1-g2490012 - LSMinimumSystemVersion - 11 - CFBundleDevelopmentRegion - en - CFBundleInfoDictionaryVersion - 6.0 - CFBundlePackageType - APPL - CFBundleSignature - ???? - NSHumanReadableCopyright - ${AuthorCopyright:HtmlEncode} - NSPrincipalClass - NSApplication - NSMainStoryboardFile - Main - XSAppIconAssets - Assets.xcassets/AppIcon.appiconset - LSUIElement - - BUNDLE VERSION COMMENT - Bundle version is updated "after" a commit has been made (because it needs to reflect the commit hash). Therefore its always "one commit behind" in version history, but is updated to actual version on build. - - + + CFBundleName + Astro Wall + CFBundleIdentifier + com.astro.wall.Astro-Wall + CFBundleShortVersionString + 0.1.5 + CFBundleVersion + 0.1.5-alpha-1-g704f747 + LSMinimumSystemVersion + 11 + CFBundleDevelopmentRegion + en + CFBundleInfoDictionaryVersion + 6.0 + CFBundlePackageType + APPL + CFBundleSignature + ???? + NSHumanReadableCopyright + ${AuthorCopyright:HtmlEncode} + NSPrincipalClass + NSApplication + NSMainStoryboardFile + Main + XSAppIconAssets + Assets.xcassets/AppIcon.appiconset + LSUIElement + + BUNDLE VERSION COMMENT + Bundle version is updated "after" a commit has been made (because it needs to reflect the commit hash). Therefore its always "one commit behind" in version history, but is updated to actual version on build. + + \ No newline at end of file diff --git a/cli5/Program.cs b/cli5/Program.cs index 9dbc760..d71b71d 100644 --- a/cli5/Program.cs +++ b/cli5/Program.cs @@ -43,45 +43,45 @@ static void regPreRelease(UpdateManifest manifest) // Build binaries Console.WriteLine("Building binaries..."); - //string buildOutput = runCommand("msbuild ./AstroWall.sln /property:Configuration=Release"); - //var outputLines = buildOutput.Split("\n"); - //Console.WriteLine(outputLines[outputLines.Length - 2]); - //Console.WriteLine("Binaries built."); - - //// Create pkgs - //Console.WriteLine("Creating pkg"); - //string shret = runCommand("sh ./scripts/pack.sh", "./AstroWall"); - //Console.WriteLine(shret); - //Console.WriteLine("PKGs created"); - - //// Update manifest - //Release rel = new Release() - //{ - // version = newTagLong, - // ReleaseDate = DateTime.Now, - // DirectPKGurl = $"https://github.com/wiegell/AstroWall/releases/download/{newTagShort}/Astro.pkg", - // Description = "Lorem Ipsum", - // isPreRelease = true - //}; - //if (manifest.PreReleases == null) manifest.PreReleases = new Release[0]; - //manifest.PreReleases = (Release[])manifest.PreReleases.Append(rel).ToArray(); - //writeToFile(manifest); - - //// Commit manifest - //runCommand($"git add . && git commit -m \\\"Updated manifest with release {newTagLong}\\\""); - - //// Push new tag to gh - //Console.WriteLine("Pushing new tag to origin"); - //runCommand("git push origin --tags"); - - //// Upload release - //Console.WriteLine("Uploading release to gh"); - //string uploadres = runCommand($"gh release create --generate-notes {newTagShort} ./AstroWall/bin/Package/Astro.pkg"); - //Console.WriteLine("Upload res:\n" + uploadres); - - //// Push manifest - //string gitPushReturn = runCommand("git push origin master"); - //Console.WriteLine("Success: " + gitPushReturn); + string buildOutput = runCommand("msbuild ./AstroWall.sln /property:Configuration=Release"); + var outputLines = buildOutput.Split("\n"); + Console.WriteLine(outputLines[outputLines.Length - 2]); + Console.WriteLine("Binaries built."); + + // Create pkgs + Console.WriteLine("Creating pkg"); + string shret = runCommand("sh ./scripts/pack.sh", "./AstroWall"); + Console.WriteLine(shret); + Console.WriteLine("PKGs created"); + + // Update manifest + Release rel = new Release() + { + version = newTagLong, + ReleaseDate = DateTime.Now, + DirectPKGurl = $"https://github.com/wiegell/AstroWall/releases/download/{newTagShort}/Astro.pkg", + Description = "Lorem Ipsum", + isPreRelease = true + }; + if (manifest.PreReleases == null) manifest.PreReleases = new Release[0]; + manifest.PreReleases = (Release[])manifest.PreReleases.Append(rel).ToArray(); + writeToFile(manifest); + + // Commit manifest + runCommand($"git add . && git commit -m \\\"Updated manifest with release {newTagLong}\\\""); + + // Push new tag to gh + Console.WriteLine("Pushing new tag to origin"); + runCommand("git push origin --tags"); + + // Upload release + Console.WriteLine("Uploading release to gh"); + string uploadres = runCommand($"gh release create --generate-notes {newTagShort} ./AstroWall/bin/Package/Astro.pkg"); + Console.WriteLine("Upload res:\n" + uploadres); + + // Push manifest + string gitPushReturn = runCommand("git push origin master"); + Console.WriteLine("Success: " + gitPushReturn); } else {