Example #1
0
        public void AddBuild()
        {
            var newBuild = new BuildEntry();

            Builds.Add(newBuild);

            BuildAdded(newBuild);
        }
Example #2
0
        public BuildEntryView(BuildEntry build)
        {
            Build = build;

            ShowScenes = true;

            //ShowFoldersToCopy = true;

            ShowLocalFoldersToCopy = true;

            ShowLocalFilesToCopy = true;

            ShowBuild = true;

            BuildChecked = false;
        }
Example #3
0
        public static void PerformAutoBuild()
        {
            var buildName = CommandLineArgs.GetArgumentValue("buildName");

            Debug.Log("PerformAutoBuild running for build name \"" + buildName + "\"");

            BuildManagerWindow bmw = ScriptableObject.CreateInstance("BuildManagerWindow") as BuildManagerWindow;

            Debug.Log("Loading manifest at " + bmw.ManifestPath);
            bmw.LoadManifest();

            BuildEntry buildEntry = bmw.Manifest.Builds.Find(e => e.Name == buildName);

            if (buildEntry == null)
            {
                Debug.Log("Failure:  Haxxis build entry not found.");
                EditorApplication.Exit(1);
                return;
            }

            //buildEntry.DoCopyFolders = true;
            buildEntry.DoCopyLocalFolders = true;
            buildEntry.DoCopyLocalFiles   = true;
            buildEntry.DoDeploy           = false;

            Debug.Log("Starting the build");
            BuildPathEnvironmentVariable candidateBuildRootEnvVar = new BuildPathEnvironmentVariable(
                @"CGC_CANDIDATE_BUILD_ROOT",
                "Value should be the path where candidate builds should be placed (only used by Build Server).");
            var success = buildEntry.Build(candidateBuildRootEnvVar);

            if (!success)
            {
                Debug.Log("PerformAutoBuild failed");
                EditorApplication.Exit(1);
                return;
            }

            Debug.Log("Finished running PerformAutoBuild");
        }
Example #4
0
        public static void PerformAutoDeploy()
        {
            // This is a call designed to be made externally, to do just the 'deploy' step on an already-built local build.
            var buildName = CommandLineArgs.GetArgumentValue("buildName");

            Debug.Log("PerformAutoDeploy running for build name \"" + buildName + "\"");

            BuildManagerWindow bmw = ScriptableObject.CreateInstance("BuildManagerWindow") as BuildManagerWindow;

            Debug.Log("Loading manifest at " + bmw.ManifestPath);
            bmw.LoadManifest();

            BuildEntry buildEntry = bmw.Manifest.Builds.Find(e => e.Name == buildName);

            if (buildEntry == null)
            {
                Debug.Log("Failure:  Haxxis build entry not found.");
                EditorApplication.Exit(1);
                return;
            }

            buildEntry.DoDeploy = true;
            BuildPathEnvironmentVariable candidateBuildRootEnvVar = new BuildPathEnvironmentVariable(
                @"CGC_CANDIDATE_BUILD_ROOT",
                "Value should be the path where candidate builds should be placed (only used by Build Server).");
            var    path             = Path.Combine(candidateBuildRootEnvVar.Value, buildEntry.Name);
            var    filename         = Path.Combine(path, BuildEntry.LastBuildMadeFilename);
            string lastBuildDirName = File.ReadAllText(filename);

            Debug.Log("Starting the deploy");
            var relativePath = Path.Combine(buildEntry.Name, lastBuildDirName);

            buildEntry.Deploy(relativePath, candidateBuildRootEnvVar);

            Debug.Log("Finished running PerformAutoDeploy");
        }
Example #5
0
        private void HandleBuildRemoved(BuildEntry build)
        {
            var view = BuildViews.First(b => b.Build == build);

            BuildViews.Remove(view);
        }
Example #6
0
 private void HandleBuildAdded(BuildEntry build)
 {
     BuildViews.Add(new BuildEntryView(build));
 }
Example #7
0
        private void RemoveBuild(BuildEntry build)
        {
            Builds.Remove(build);

            BuildRemoved(build);
        }