CreateClone(string cloneName, string deployName, string branchName, string repoUrl, string imagePath, string destPath)
 {
     // FIXME: implement image
     if (cloneName != null)
     {
         // if deployment requested or image path is provided
         if (imagePath != null || deployName != null)
         {
             PyRevit.DeployFromImage(
                 cloneName,
                 deploymentName: deployName,
                 branchName: branchName,
                 imagePath: imagePath,
                 destPath: destPath
                 );
         }
         // otherwise clone the full repo
         else
         {
             PyRevit.DeployFromRepo(
                 cloneName,
                 deploymentName: deployName,
                 branchName: branchName,
                 repoUrl: repoUrl,
                 destPath: destPath
                 );
         }
     }
 }
Beispiel #2
0
        public void DeployFromRepo_Develop_Test()
        {
            var testCloneBranch = "develop";

            PyRevit.DeployFromRepo(
                cloneName: testCloneName,
                deploymentName: null,
                branchName: testCloneBranch,
                repoUrl: null,
                destPath: TempPath
                );

            var clone = PyRevit.GetRegisteredClone(testCloneName);

            PyRevit.UnregisterClone(clone);

            Assert.IsTrue(clone.IsRepoDeploy);
            Assert.AreEqual(testCloneBranch, clone.Branch);
        }
Beispiel #3
0
        public void DeployFromRepo_Deployment_Test()
        {
            var testCloneDeployment = "core";
            var testCloneBranch     = "develop";

            try {
                PyRevit.DeployFromRepo(
                    cloneName: testCloneName,
                    deploymentName: testCloneDeployment,
                    branchName: testCloneBranch,
                    repoUrl: null,
                    destPath: TempPath
                    );
            }
            catch (NotImplementedException) {
            }
            catch (Exception ex) {
                Assert.Fail(ex.Message);
            }
        }