diff --git a/RELEASE.md b/RELEASE.md new file mode 100644 index 00000000..ca9d51a9 --- /dev/null +++ b/RELEASE.md @@ -0,0 +1 @@ +New release description, automatically pulled from RELEASE.md file \ No newline at end of file diff --git a/git-release.cake b/git-release.cake index 6eefcff4..e82174b7 100644 --- a/git-release.cake +++ b/git-release.cake @@ -18,30 +18,30 @@ Task("GitRelease") var username = "user"; var password = Argument("GithubToken"); var owner = "Microsoft"; - var repo = "mobile-center-sdk-unity"; - - // Create temp release file. - System.IO.File.Create("tempRelease.md").Dispose(); - var releaseFile = File("tempRelease.md"); - FileWriteText(releaseFile,"Please update description. It will be pulled out automatically from release.md next time."); + var repo = "AppCenter-SDK-Unity"; // Build a string containing paths to NuGet packages var files = GetFiles("output/*.unitypackage"); - var assets = string.Empty; + var assets = new List(); + Information("Releasing packages:"); foreach (var file in files) { - assets += file.FullPath + ","; + if (!file.FullPath.EndsWith("AppCenter-v" + publishVersion + ".unitypackage") && + !file.FullPath.EndsWith("AppCenterPush-v" + publishVersion + ".unitypackage")) + { + Information(file.FullPath); + assets.Add(file.FullPath); + } } - assets = assets.Substring(0,assets.Length-1); - GitReleaseManagerCreate(username, password, owner, repo, new GitReleaseManagerCreateSettings { - Prerelease = true, - Assets = assets, - TargetCommitish = "master", - InputFilePath = releaseFile.Path.FullPath, + GitReleaseManagerCreate(username, password, owner, repo, new GitReleaseManagerCreateSettings + { + Prerelease = false, + Assets = string.Join(",", assets), + TargetCommitish = "develop", + InputFilePath = new FilePath("RELEASE.md"), Name = publishVersion }); - GitReleaseManagerPublish(username, password, owner, repo, publishVersion); - DeleteFile(releaseFile); + GitReleaseManagerPublish(username, password, owner, repo, publishVersion); }); RunTarget(TARGET);