Skip to content

Commit

Permalink
1.3.2
Browse files Browse the repository at this point in the history
## [1.3.2](v1.3.1...v1.3.2) (2020-09-11)

### Bug Fixes

* support 2019.4.10 & 2020.1.5 ([502ddd2](502ddd2)), closes [#97](#97)
  • Loading branch information
semantic-release-bot committed Sep 11, 2020
1 parent ecf4c7d commit 32f48d5
Show file tree
Hide file tree
Showing 3 changed files with 24 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.3.2](https://github.com/mob-sakai/UpmGitExtension/compare/v1.3.1...v1.3.2) (2020-09-11)


### Bug Fixes

* support 2019.4.10 & 2020.1.5 ([502ddd2](https://github.com/mob-sakai/UpmGitExtension/commit/502ddd285ee455a18a76c7a84c2f9d24ebe160a7)), closes [#97](https://github.com/mob-sakai/UpmGitExtension/issues/97)

## [1.3.1](https://github.com/mob-sakai/UpmGitExtension/compare/v1.3.0...v1.3.1) (2020-08-14)


Expand Down
18 changes: 16 additions & 2 deletions Editor/Coffee.UpmGitExtension/InternalBridge.cs
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,12 @@
#if UNITY_2019_1_9 || UNITY_2019_1_10 || UNITY_2019_1_11 || UNITY_2019_1_12 || UNITY_2019_1_13 || UNITY_2019_1_14 || UNITY_2019_2_OR_NEWER
#define UNITY_2019_1_9_OR_NEWER
#endif
#if UNITY_2019_4_OR_NEWER && !UNITY_2019_4_1 && !UNITY_2019_4_2 && !UNITY_2019_4_3 && !UNITY_2019_4_4 && !UNITY_2019_4_5 && !UNITY_2019_4_6 && !UNITY_2019_4_7 && !UNITY_2019_4_8 && !UNITY_2019_4_9
#define UNITY_2019_4_10_OR_NEWER
#endif
#if UNITY_2020_1_OR_NEWER && !UNITY_2020_1_1 && !UNITY_2020_1_2 && !UNITY_2020_1_3 && !UNITY_2020_1_4
#define UNITY_2020_1_5_OR_NEWER
#endif
using System;
using System.Linq;
using System.Collections.Generic;
Expand All @@ -19,6 +25,7 @@
#if UNITY_2019_3_OR_NEWER
using Package = UnityEditor.PackageManager.UI.UpmPackage;
using PackageInfo = UnityEditor.PackageManager.UI.UpmPackageVersion;

#else
using Package = UnityEditor.PackageManager.UI.Package;
using PackageInfo = UnityEditor.PackageManager.UI.PackageInfo;
Expand Down Expand Up @@ -137,7 +144,6 @@ public static void UpdatePackageCollection()
internal static class PackageExtensions
{
#if UNITY_2020_1_OR_NEWER

#if UNITY_2020_2_OR_NEWER
internal static PageManager PageManagerInstance => ServicesContainer.instance.Resolve<PageManager>();
#else
Expand Down Expand Up @@ -207,7 +213,11 @@ internal static UpmPackageVersion ToPackageVersion(this AvailableVersion self, U
newPInfo.m_Version = self.version;
newPInfo.m_Git = new GitInfo("", self.refName);

#if UNITY_2020_1_5_OR_NEWER
var p = new UpmPackageVersion(newPInfo, false, semver, newPInfo.displayName, false);
#else
var p = new UpmPackageVersion(newPInfo, false, semver, newPInfo.displayName);
#endif

// Update tag.
PackageTag tag = PackageTag.Git | PackageTag.Installable | PackageTag.Removable;
Expand Down Expand Up @@ -237,7 +247,7 @@ internal static IEnumerable<UpmPackage> GetGitPackages()

internal static IEnumerable<UpmPackageVersion> GetGitPackageInfos()
{
return GetGitPackages().Select(x=>x.installedVersion).Cast<UpmPackageVersion>();
return GetGitPackages().Select(x => x.installedVersion).Cast<UpmPackageVersion>();
}

internal static UpmPackageVersion GetInstalledVersion(this UpmPackage self)
Expand Down Expand Up @@ -284,7 +294,11 @@ internal static UpmPackageVersion ToPackageVersion(this AvailableVersion self, U
newPInfo.m_Version = self.version;
newPInfo.m_Git = new GitInfo("", self.refName);

#if UNITY_2019_4_10_OR_NEWER
var p = new UpmPackageVersion(newPInfo, false, semver, newPInfo.displayName, false);
#else
var p = new UpmPackageVersion(newPInfo, false, semver, newPInfo.displayName);
#endif

// Update tag.
PackageTag tag = PackageTag.Git | PackageTag.Installable | PackageTag.Removable;
Expand Down
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "com.coffee.upm-git-extension",
"version": "1.3.1",
"version": "1.3.2",
"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",
"license": "MIT",
"repository": {
Expand Down

0 comments on commit 32f48d5

Please sign in to comment.