static void ChangeABRoot() { parseCommand(); if (string.IsNullOrEmpty(ABRoot) || "null" == ABRoot.ToLower()) { return; } Dictionary <string, string> versionInfo = ABHelper.ReadVersionIdFile(); versionInfo["ABFolderRoot"] = ABRoot; ABHelper.WriteVersionIdFile(versionInfo); }
static void ChangeVersionId() { parseCommand(); if (string.IsNullOrEmpty(VersionId) || "null" == VersionId.ToLower()) { return; } Dictionary <string, string> versionInfo = ABHelper.ReadVersionIdFile(); versionInfo["ResVersion"] = VersionId; ABHelper.WriteVersionIdFile(versionInfo); }
static void Build() { parseCommand(); Dictionary <string, string> versionInfo = ABHelper.ReadVersionIdFile(); if (!string.IsNullOrEmpty(ABRoot) && "nil" != ABRoot.ToLower()) { versionInfo["ABFolderRoot"] = ABRoot; } if (!string.IsNullOrEmpty(ApkRoot) && "nil" != ApkRoot.ToLower()) { versionInfo["ApkFolderRoot"] = ApkRoot; } if (!string.IsNullOrEmpty(VersionId) && "nil" != VersionId.ToLower()) { versionInfo["ResVersion"] = VersionId; } ABHelper.WriteVersionIdFile(versionInfo); AssetDatabase.Refresh(); switch (TypeV.ToLower()) { case "ab": ABPacker.CommandBuild(true, Platform); break; case "apk": BuildAppSteps.CommandBuild(IsDebug, Platform); break; case "ab2apk": ABPacker.CommandBuild(IsDebug, Platform); BuildAppSteps.CommandBuild(IsDebug, Platform); break; default: break; } }