Skip to content

Commit

Permalink
1.1.0-preview.13
Browse files Browse the repository at this point in the history
# [1.1.0-preview.13](v1.1.0-preview.12...v1.1.0-preview.13) (2020-05-27)

### Bug Fixes

* only transform if it is not already in the SSH format, close [#47](#47) ([f2e71b2](f2e71b2))
  • Loading branch information
semantic-release-bot committed May 27, 2020
1 parent aa9f6ea commit 3721ff9
Show file tree
Hide file tree
Showing 3 changed files with 17 additions and 3 deletions.
7 changes: 7 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,3 +1,10 @@
# [1.1.0-preview.13](https://github.com/mob-sakai/UpmGitExtension/compare/v1.1.0-preview.12...v1.1.0-preview.13) (2020-05-27)


### Bug Fixes

* only transform if it is not already in the SSH format, close [#47](https://github.com/mob-sakai/UpmGitExtension/issues/47) ([f2e71b2](https://github.com/mob-sakai/UpmGitExtension/commit/f2e71b2860f5515cf4a9b15e7947bd9d226e50ff))

# [1.1.0-preview.12](https://github.com/mob-sakai/UpmGitExtension/compare/v1.1.0-preview.11...v1.1.0-preview.12) (2020-03-07)


Expand Down
11 changes: 9 additions & 2 deletions Editor/Coffee.UpmGitExtension/UI/InstallPackageWindow.cs
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,8 @@

namespace Coffee.UpmGitExtension
{
using System;

internal class InstallPackageWindow : VisualElement
{
//################################
Expand Down Expand Up @@ -187,8 +189,13 @@ void onClick_InstallPackage()

public static string GetRepoUrl(string url)
{
Match m = Regex.Match(url, "(git@[^:]+):(.*)");
string ret = m.Success ? string.Format("ssh://{0}/{1}", m.Groups[1].Value, m.Groups[2].Value) : url;
string ret = url;

if (!url.StartsWith("ssh://", StringComparison.InvariantCultureIgnoreCase))
{
Match m = Regex.Match(url, "(git@[^:]+):(.*)");
ret = m.Success ? string.Format("ssh://{0}/{1}", m.Groups[1].Value, m.Groups[2].Value) : url;
}
#if UNITY_2019_1_OR_NEWER
return ret.EndsWith(".git") ? ret : "git+" + ret;
#else
Expand Down
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
"name": "com.coffee.upm-git-extension",
"displayName": "UPM Git Extension",
"description": "This package extends the UI of Unity Package Manager (UPM) for the packages installed from git repository.\n\n - Support GitHub, GitLab, Bitbucket, etc.\n - Link to the repogitory and offline documents\n - Install the package from git repository with UI\n - Update the package with a specific tag/branch\n - Remove the package",
"version": "1.1.0-preview.12",
"version": "1.1.0-preview.13",
"unity": "2018.3",
"license": "MIT",
"repository": {
Expand Down

0 comments on commit 3721ff9

Please sign in to comment.