private static void Export()
 {
     AssetDatabase.ExportPackage(
         AssetDatabase.GetAllAssetPaths().Where(path => path == ToolExporter.RootPath ||
                                                path.StartsWith(ToolExporter.RootPath + "/") && !ToolExporter.IgnorePattern.IsMatch(path))
         .ToArray(),
         Path.Combine(
             ToolExporter.DestinationFolderPath,
             $"{ProductInfoUtility.GetDeveloperLinkTitle()}-{ProductInfoUtility.GetVersion()}.unitypackage"
             )
         );
 }
Example #2
0
 private static void SaveReleaseInfo()
 {
     File.WriteAllText(Path.Combine(
                           Path.GetDirectoryName(Application.dataPath),
                           JsonReleaseInfo.VitDeckRootPath,
                           JsonReleaseInfo.JsonReleaseInfoPath
                           ), JsonUtility.ToJson(new JsonReleaseInfo.ReleaseInfo()
     {
         version      = ProductInfoUtility.GetVersion(),
         package_name = ProductInfoUtility.GetDeveloperLinkTitle(),
         download_url = $"{ProductInfoUtility.GetDeveloperLinkURL()}/releases/download/v{ProductInfoUtility.GetVersion()}/{ToolExporter.GetPackageName()}",
     }, true));
     AssetDatabase.Refresh();
 }
Example #3
0
 private void Init()
 {
     versionLabel       = "Version : " + ProductInfoUtility.GetVersion();
     developerLinkTitle = ProductInfoUtility.GetDeveloperLinkTitle();
     developerLinkURL   = ProductInfoUtility.GetDeveloperLinkURL();
     if (UpdateCheck.Enabled)
     {
         var version = UpdateCheck.GetLatestVersion();
         if (version == null)
         {
             latestVersion = "None";
         }
         else
         {
             latestVersion = version;
         }
         latestVersionLabel = "Latest Version : " + latestVersion;
     }
 }
Example #4
0
 private static string GetPackageName()
 {
     return($"{ProductInfoUtility.GetDeveloperLinkTitle().Replace(" ", "-")}-{ProductInfoUtility.GetVersion()}.unitypackage");
 }
Example #5
0
        public void TestGetDeveloperLinkTitle()
        {
            var title = ProductInfoUtility.GetDeveloperLinkTitle();

            Assert.That(title, Is.EqualTo("VitDeck on GitHub"));
        }