Skip to content
This repository was archived by the owner on Dec 5, 2024. It is now read-only.

Commit 02a36a9

Browse files
authored
Merge branch 'master' into patch-1
2 parents 395843c + bd9a081 commit 02a36a9

File tree

6 files changed

+71
-503
lines changed

6 files changed

+71
-503
lines changed

docs/process/release-process.md

Lines changed: 68 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,68 @@
1+
# Release process
2+
3+
## Release information
4+
5+
### Tag name format
6+
7+
***Alpha releases***: `v[major].[minor]-alpha`
8+
9+
***Beta releases***: `v[major].[minor]-beta`
10+
11+
***Releases***: `v[major].[minor]`
12+
13+
## The process
14+
15+
#### TL;DR
16+
17+
1. Dev branches to a release branch every week, create draft release with release notes
18+
2. QA tests release branch for up to a week
19+
3. Dev continues work on master
20+
4. Dev fixes shipblockers on release branch and updates build on draft release page, and makes sure fixes are also sent to master
21+
5. QA publishes release by tagging the release branch and hitting "Publish"
22+
6. Goto 1
23+
24+
#### The long explanation
25+
26+
Every week:
27+
28+
1. Create a release branch from master with the name `release/[Major].[Minor]`, where `[Major].[Minor]` are the current major and minor parts of the version set on master.
29+
1. Bump the version on master
30+
1. Create a draft release with the release notes, following the format below
31+
1. Upload a build created from the release branch
32+
1. QA tests the release and logs any issues found in it. Issues are fixed on the next release unless they are related to the issues that are reported as fixed in the current release, and they are shipblockers.
33+
1. If the release requires fixes:
34+
1. If the fix is reverting a PR, that doesn't have to be done on master, only on the release branch. Otherwise:
35+
1. Create a branch from the release branch fork point (the commit that the release branch is based on)
36+
1. Push the fix to this branch and create a PR targetting the release branch
37+
1. Upload a new build from the release branch
38+
1. Create another branch from master, merge the fix branch into it and create a PR targetting master
39+
1. QA approves release by:
40+
1. Filling out the tag name, in the format shown above
41+
1. Selecting the release branch corresponding to the build
42+
1. Clicking `Publish release`
43+
44+
45+
## Template for release notes
46+
47+
The https://github.com/github-for-unity/unity-release-notes node project generates draft release notes by outputting all issues labeled `Feature`, `Enhancement` and `Bug` closed since the last release in the correct format for release notes, and also outputs all PRs closed since the last release, in case some issues might not have been correctly labeled and/or created.
48+
49+
The markdown format for release notes is below. This is what the project above generates (more or less).
50+
51+
```
52+
# Release notes
53+
54+
[any special notes and/or funny/relevant image for the release here, if needed]
55+
56+
## Features
57+
58+
- #XXX - Title of issue (adjust for user consumption if needed)
59+
60+
## Enhancements
61+
62+
- #XXX - Title of issue (adjust for user consumption if needed)
63+
64+
## Fixes
65+
66+
- #XXX - Title of issue (adjust for user consumption if needed)
67+
68+
```

docs/readme.md

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -24,8 +24,9 @@ Details about how the team is organizing and shipping GitHub for Unity:
2424

2525
- **[Issue Triage](process/issue-triage.md)** - how we address issues reported
2626
by users
27-
- **[Review Process](process/reviews.md)** - how we review contributions
27+
- **[Review](process/reviews.md)** - how we review contributions
2828
- **[Roadmap](process/roadmap.md)** - how we plan for the future
29+
- **[Release](process/release-process.md)** - how we review contributions
2930

3031
## Technical
3132

src/UnityExtension/Assets/Editor/GitHub.Unity/GitHub.Unity.csproj

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -91,8 +91,6 @@
9191
<Compile Include="Misc\Utility.cs" />
9292
<Compile Include="Services\AuthenticationService.cs" />
9393
<Compile Include="Services\StatusService.cs" />
94-
<Compile Include="Tasks\EvaluateProjectConfigurationTask.cs" />
95-
<Compile Include="Tasks\TaskException.cs" />
9694
<Compile Include="Tools\MozRoots.cs" />
9795
<Compile Include="UI\AuthenticationView.cs" />
9896
<Compile Include="UI\BranchesView.cs" />

src/UnityExtension/Assets/Editor/GitHub.Unity/Misc/Utility.cs

Lines changed: 1 addition & 126 deletions
Original file line numberDiff line numberDiff line change
@@ -1,75 +1,14 @@
11
using System;
2-
using System.Collections.Generic;
32
using System.IO;
43
using System.Linq;
54
using System.Reflection;
6-
using System.Text.RegularExpressions;
75
using UnityEditor;
86
using UnityEngine;
97

108
namespace GitHub.Unity
119
{
1210
class Utility : ScriptableObject
1311
{
14-
private static readonly ILogging logger = Logging.GetLogger<Utility>();
15-
16-
public const string StatusRenameDivider = "->";
17-
public static readonly Regex ListBranchesRegex =
18-
new Regex(@"^(?<active>\*)?\s+(?<name>[\w\d\/\-_]+)\s*(?:[a-z|0-9]{7} \[(?<tracking>[\w\d\/\-\_]+)\])?");
19-
public static readonly Regex ListRemotesRegex =
20-
new Regex(@"(?<name>[\w\d\-_]+)\s+(?<url>https?:\/\/(?<login>(?<user>[\w\d]+)(?::(?<token>[\w\d]+))?)@(?<host>[\w\d\.\/\%]+))\s+\((?<function>fetch|push)\)");
21-
public static readonly Regex LogCommitRegex = new Regex(@"commit\s(\S+)");
22-
public static readonly Regex LogMergeRegex = new Regex(@"Merge:\s+(\S+)\s+(\S+)");
23-
public static readonly Regex LogAuthorRegex = new Regex(@"Author:\s+(.+)\s<(.+)>");
24-
public static readonly Regex LogTimeRegex = new Regex(@"Date:\s+(.+)");
25-
public static readonly Regex LogDescriptionRegex = new Regex(@"^\s+(.+)");
26-
public static readonly Regex StatusStartRegex = new Regex(@"(?<status>[AMRDC]|\?\?)(?:\d*)\s+(?<path>[\w\d\/\.\-_ \@]+)");
27-
public static readonly Regex StatusEndRegex = new Regex(@"->\s(?<path>[\w\d\/\.\-_ ]+)");
28-
public static readonly Regex StatusBranchLineValidRegex = new Regex(@"\#\#\s+(?:[\w\d\/\-_\.]+)");
29-
public static readonly Regex StatusAheadBehindRegex =
30-
new Regex(
31-
@"\[ahead (?<ahead>\d+), behind (?<behind>\d+)\]|\[ahead (?<ahead>\d+)\]|\[behind (?<behind>\d+>)\]");
32-
33-
private static bool ready;
34-
private static Action onReady;
35-
36-
public static void RegisterReadyCallback(Action callback)
37-
{
38-
if (!ready)
39-
{
40-
onReady += callback;
41-
}
42-
else
43-
{
44-
try
45-
{
46-
callback();
47-
}
48-
catch (Exception ex)
49-
{
50-
Debug.LogException(ex);
51-
}
52-
53-
}
54-
}
55-
56-
public static void UnregisterReadyCallback(Action callback)
57-
{
58-
onReady -= callback;
59-
}
60-
61-
public static void Initialize()
62-
{
63-
// Evaluate project settings
64-
Issues = new List<ProjectConfigurationIssue>();
65-
}
66-
67-
public static void Run()
68-
{
69-
ready = true;
70-
onReady.SafeInvoke();
71-
}
72-
7312
public static Texture2D GetIcon(string filename, string filename2x = "")
7413
{
7514
if (EditorGUIUtility.pixelsPerPoint > 1f && !string.IsNullOrEmpty(filename2x))
@@ -81,73 +20,9 @@ public static Texture2D GetIcon(string filename, string filename2x = "")
8120
if (stream != null)
8221
return stream.ToTexture2D();
8322

84-
var iconPath = ExtensionInstallPath.ToNPath().Combine("IconsAndLogos", filename).ToString(SlashMode.Forward);
23+
var iconPath = EntryPoint.Environment.ExtensionInstallPath.Combine("IconsAndLogos", filename).ToString(SlashMode.Forward);
8524
return AssetDatabase.LoadAssetAtPath<Texture2D>(iconPath);
8625
}
87-
88-
public static Texture2D CreateTextureFromColor(Color color)
89-
{
90-
Texture2D backgroundTexture = new Texture2D(1, 1);
91-
Color c = color;
92-
backgroundTexture.SetPixel(1, 1, c);
93-
backgroundTexture.Apply();
94-
95-
return backgroundTexture;
96-
}
97-
98-
public static string GitInstallPath
99-
{
100-
get { return EntryPoint.Environment.GitExecutablePath; }
101-
}
102-
103-
public static string GitRoot
104-
{
105-
get { return EntryPoint.Environment.RepositoryPath; }
106-
}
107-
108-
public static string UnityAssetsPath
109-
{
110-
get { return EntryPoint.Environment.UnityAssetsPath; }
111-
}
112-
113-
public static string UnityProjectPath
114-
{
115-
get { return EntryPoint.Environment.UnityProjectPath; }
116-
}
117-
118-
public static string ExtensionInstallPath
119-
{
120-
get { return EntryPoint.Environment.ExtensionInstallPath; }
121-
}
122-
123-
public static List<ProjectConfigurationIssue> Issues { get; protected set; }
124-
125-
public static bool GitFound
126-
{
127-
get { return !string.IsNullOrEmpty(GitInstallPath); }
128-
}
129-
130-
public static bool ActiveRepository
131-
{
132-
get { return !string.IsNullOrEmpty(GitRoot); }
133-
}
134-
135-
public static bool IsDevelopmentBuild
136-
{
137-
get { return File.Exists(Path.Combine(UnityProjectPath.Replace('/', Path.DirectorySeparatorChar), ".devroot")); }
138-
}
139-
140-
public static Texture2D GetTextureFromColor(Color color)
141-
{
142-
Color[] pix = new Color[1];
143-
pix[0] = color;
144-
145-
Texture2D result = new Texture2D(1, 1);
146-
result.SetPixels(pix);
147-
result.Apply();
148-
149-
return result;
150-
}
15126
}
15227

15328
static class StreamExtensions

0 commit comments

Comments
 (0)