提交 420d19c1 编写于 作者: 魔术师Dix's avatar 魔术师Dix

【UpmGitTool】更新数据结构;

上级 c1562fa0
......@@ -12,3 +12,9 @@
/UpmGitTool/.vs
/UpmGitTool/bin
/UpmGitTool/obj
/UpmGitTool/Temp
/UpmGitTool/Library
/UpmGitTool/Logs
/UpmGitTool/*.csproj
/UpmPublisher/UpmPublisher/.vs
/UpmGitTool/UserSettings
#if UNITY_2020_3_41|| UNITY_2021_3_12
#if UNITY_2020_3_41|| UNITY_2020_3_42|| UNITY_2021_3_12
#define UPM_GIT_NEW
#else
#undef UPM_GIT_NEW
......
#if UNITY_2020_3_41 || UNITY_2021_3_12
#if UNITY_2020_3_41 || UNITY_2020_3_42 || UNITY_2021_3_12
#define UPM_GIT_NEW
#else
#undef UPM_GIT_NEW
......
{
"dependencies": {
"com.unity.collab-proxy": "1.17.2",
"com.unity.collab-proxy": "1.17.6",
"com.unity.ide.visualstudio": "2.0.16",
"com.unity.ide.vscode": "1.2.5",
"com.unity.test-framework": "1.1.33",
......
{
"dependencies": {
"com.unity.collab-proxy": {
"version": "1.17.2",
"version": "1.17.6",
"depth": 0,
"source": "registry",
"dependencies": {
......
m_EditorVersion: 2020.3.41f1c1
m_EditorVersionWithRevision: 2020.3.41f1c1 (148a17cb7d64)
m_EditorVersion: 2020.3.42f1c1
m_EditorVersionWithRevision: 2020.3.42f1c1 (b85f4368f10f)
......@@ -32,7 +32,9 @@ namespace UpmGitTool
public void OnAfterDeserialize()
{
if (versions == null) return;
foreach (var version in versions)
version?.OnAfterDeserialize();
}
}
......
......@@ -31,12 +31,25 @@ namespace UpmGitTool
public void SetData(FetchResult fetch)
{
FetchResult = fetch;
//查找当前安装的版本;
if (PackageItem == null) return;
if (fetch.versions == null) return;
string pkgId = PackageItem.PackageId;
InstallVersion = null;
foreach (var version in fetch.versions)
{
if (version.PackageId == pkgId)
{
InstallVersion = version;
break;
}
}
}
public UPackage(FetchResult fetch)
{
SetData(fetch);
Key = fetch.url;
SetData(fetch);
}
/// <summary>
......@@ -44,5 +57,10 @@ namespace UpmGitTool
/// </summary>
public UpmPackageVersion InstallVersion;
/// <summary>
/// 当前工程是否有已经安装的包;
/// </summary>
public bool IsIstalled => InstallVersion != null;
}
}
\ No newline at end of file
......@@ -48,5 +48,16 @@ namespace UpmGitTool
public DependencyInfo[] Dependencies => m_Dependencies;
public string DocumentationUrl => m_DocumentationUrl;
public string ChangelogUrl => m_ChangelogUrl;
public string GitUrl { get; private set; }
public string PackageName { get; private set; }
public void OnAfterDeserialize()
{
var strArr = PackageId.Split('@');
PackageName = strArr[0];
GitUrl = strArr[1];
}
}
}
\ No newline at end of file
......@@ -22,8 +22,12 @@ namespace UpmGitTool
[SerializeField]
public string Name;
/// <summary>
/// PackageId : 包 Git Url ;
/// https://…….git#……
/// </summary>
[SerializeField]
public string Path;
public string PackageUrl;
public bool IsGitUrl { get; private set; }
......@@ -31,7 +35,7 @@ namespace UpmGitTool
public PackageItem(string name, string path)
{
Name = name;
Path = path;
PackageUrl = path;
IsGitUrl = false;
//检测路径
......@@ -42,6 +46,9 @@ namespace UpmGitTool
var splitStr = path.Split('#');
GitPath = splitStr[0];
BranchName = splitStr[1];
//拼写git package id
PackageId = $"{name}@{path}";
}
}
......@@ -49,6 +56,12 @@ namespace UpmGitTool
public string BranchName { get; private set; }
/// <summary>
/// 包 PkgID,com.……@https://…….git#……
/// 这个可以与拉下来的version对应
/// </summary>
public string PackageId { get; private set; }
public void OnFetchResult(int exitCode)
{
......
Build from CHIEF at 2022/12/26 18:22:42
\ No newline at end of file
Build from CHIEF at 2022/12/27 9:42:19
\ No newline at end of file
%YAML 1.1
%TAG !u! tag:unity3d.com,2011:
--- !u!162 &1
EditorUserSettings:
m_ObjectHideFlags: 0
serializedVersion: 4
m_ConfigSettings:
RecentlyUsedSceneGuid-0:
value: 515250075c0c595e5f5a5e71122159444e4e4a2f7a7d7f602f284d66b4b76661
flags: 0
vcSharedLogLevel:
value: 0d5e400f0650
flags: 0
m_VCAutomaticAdd: 1
m_VCDebugCom: 0
m_VCDebugCmd: 0
m_VCDebugOut: 0
m_SemanticMergeMode: 2
m_DesiredImportWorkerCount: 3
m_StandbyImportWorkerCount: 2
m_IdleImportWorkerShutdownDelay: 60000
m_VCShowFailedCheckout: 1
m_VCOverwriteFailedCheckoutAssets: 1
m_VCProjectOverlayIcons: 1
m_VCHierarchyOverlayIcons: 1
m_VCOtherOverlayIcons: 1
m_VCAllowAsyncUpdate: 1
m_ArtifactGarbageCollection: 1
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册