Skip to content

Commit

Permalink
Merge pull request #92 from AIO-GAME/1.x
Browse files Browse the repository at this point in the history
1.x
  • Loading branch information
xinansky authored Dec 13, 2024
2 parents adb0a34 + 83e507d commit 1fbd874
Show file tree
Hide file tree
Showing 119 changed files with 1,079 additions and 9,583 deletions.
9 changes: 6 additions & 3 deletions .github/upversion.py
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@
from tqdm import tqdm


def get_latest_github_tag(repo_url) -> str | None:
def get_latest_github_tag(repo_url) -> str:
# 从仓库 URL 提取用户和仓库名称
repo_path = repo_url.split("https://github.com/")[1].replace(".git", "")
print(f"Fetching tags from {repo_path}")
Expand Down Expand Up @@ -97,7 +97,7 @@ def read_local_email() -> str:
return result.stdout.decode('utf-8').strip()


def read_current_version() -> str | None:
def read_current_version() -> str:
try:
subprocess.run(['git', 'fetch', '--tags'], check=True)
tags = os.popen("git tag").read().split("\n")
Expand Down Expand Up @@ -136,6 +136,7 @@ def read_current_version() -> str | None:
".github/*.py",
".github/*.sh",
".github/*.bat",
"Tools/*",
]

github = os.popen("git remote get-url origin").read().strip()
Expand Down Expand Up @@ -169,14 +170,15 @@ def read_current_version() -> str | None:
current_version = package["version"]
package["version"] = new_version
f.seek(0)
f.truncate()
json.dump(package, f, indent=2)
print("写入配置: 版本号 {0} -> {1}".format(current_version, new_version))
f.close()

# 上传到远程仓库 捕获异常
if current_version != new_version:
try:
subprocess.run(['git', 'pull'], check=True)
subprocess.run(['git', 'pull', 'origin', current_branch], check=True)
subprocess.run(['git', 'add', 'package.json'], check=True)
subprocess.run(['git', 'commit', '-m', f"✨ up version {current_branch} -> {new_version}"], check=True)
subprocess.run(['git', 'push', 'origin', current_branch], check=True)
Expand Down Expand Up @@ -243,6 +245,7 @@ def read_current_version() -> str | None:
package = json.load(f)
package["type"] = "module"
f.seek(0)
f.truncate()
json.dump(package, f, indent=2)
f.close()

Expand Down
1 change: 0 additions & 1 deletion .gitmodules

This file was deleted.

Original file line number Diff line number Diff line change
Expand Up @@ -11,17 +11,15 @@ namespace AIO.UEditor
/// <summary>
/// 自定义窗口基类
/// </summary>
[PreferBinarySerialization]
public abstract partial class EmptyGraphWindow : EditorWindow
{
/// <summary>
/// 当前窗口中心点
/// </summary>
/// <param name="w">宽</param>
/// <param name="h">高</param>
protected EmptyGraphWindow(float w = 800, float h = 600)
{
minSize = new Vector2(w, h);
}
protected EmptyGraphWindow(float w = 800, float h = 600) { minSize = new Vector2(w, h); }

/// <summary>
/// 当前窗口宽度
Expand All @@ -48,24 +46,14 @@ protected EmptyGraphWindow(float w = 800, float h = 600)
/// </summary>
public Rect ReliablePosition { get; private set; }

private void ModifierKeysChanged()
{
OnModifierKeysChanged();
}
private void ModifierKeysChanged() { OnModifierKeysChanged(); }

private void ShowButton(Rect rect)
{
OnShowButton(rect);
}
private void ShowButton(Rect rect) { OnShowButton(rect); }

/// <summary>
/// 转化为信息字符串
/// </summary>
public sealed override string ToString()
{
return base.ToString();
}

public sealed override string ToString() { return base.ToString(); }

/// <summary>
/// 标记目标已改变
Expand All @@ -86,4 +74,4 @@ protected static void HasChanged(Object target)
EditorSceneManager.MarkSceneDirty(component.gameObject.scene);
}
}
}
}
3 changes: 2 additions & 1 deletion Editor.GUI.CLI/External/AIO.Plugins/PluginData.cs
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,7 @@ namespace AIO
/// 插件信息
/// </summary>
[CreateAssetMenu(menuName = "Plugins/AIO Data", fileName = nameof(PluginData))]
[PreferBinarySerialization]
internal class PluginData : ScriptableObject
{
/// <summary>
Expand Down Expand Up @@ -40,4 +41,4 @@ internal class PluginData : ScriptableObject
}

internal partial class Plugins { }
}
}
8 changes: 0 additions & 8 deletions Editor.GUI.CLI/External/RainbowFolders.meta

This file was deleted.

This file was deleted.

This file was deleted.

This file was deleted.

Loading

0 comments on commit 1fbd874

Please sign in to comment.