]> git.argeo.org Git - gpl/argeo-slc.git/commitdiff
Add developer git base url
authorMathieu Baudier <mbaudier@argeo.org>
Fri, 7 Jun 2013 12:08:17 +0000 (12:08 +0000)
committerMathieu Baudier <mbaudier@argeo.org>
Fri, 7 Jun 2013 12:08:17 +0000 (12:08 +0000)
git-svn-id: https://svn.argeo.org/slc/trunk@6335 4cfe0d0a-d680-48aa-b62c-e0a02a3f76cc

runtime/org.argeo.slc.rpmfactory/src/main/java/org/argeo/slc/rpmfactory/core/RpmFactory.java

index 4daf3b1eadb239839b3700f55cf18201e1032ec9..95e6977033e3fa62b797399d9c507127f12f897d 100644 (file)
@@ -61,6 +61,8 @@ public class RpmFactory {
        private String gitWorkspace = "git";
 
        private String localUrlBase = "http://localhost:7070/";
+       /** If not null or empty, this is a developer instance. */
+       private String gitDevBaseUrl = null;
 
        private Boolean withTestingRepository = false;
 
@@ -220,9 +222,16 @@ public class RpmFactory {
                buf.append("config_opts['scm_opts']['ext_src_dir'] = '"
                                + getSourcesDir().getAbsolutePath() + "'\n");
                buf.append("config_opts['scm_opts']['git_timestamps'] = True\n");
-               buf.append("config_opts['scm_opts']['git_get'] = 'git clone "
-                               + (branch != null ? "-b " + branch : "") + " "
-                               + getGitBaseUrl() + "/SCM_PKG.git SCM_PKG'\n");
+
+               // development
+               if (gitDevBaseUrl != null && !gitDevBaseUrl.trim().equals(""))
+                       buf.append("config_opts['scm_opts']['git_get'] = 'git clone "
+                                       + (branch != null ? "-b " + branch : "") + " "
+                                       + gitDevBaseUrl + "/SCM_PKG SCM_PKG'\n");
+               else
+                       buf.append("config_opts['scm_opts']['git_get'] = 'git clone "
+                                       + (branch != null ? "-b " + branch : "") + " "
+                                       + getGitBaseUrl() + "/SCM_PKG.git SCM_PKG'\n");
 
                buf.append("\nconfig_opts['yum.conf'] = \"\"\"\n");
                buf.append(generateYumConfigFile(arch)).append('\n');
@@ -441,4 +450,7 @@ public class RpmFactory {
                this.withTestingRepository = withTestingRepository;
        }
 
+       public void setGitDevBaseUrl(String gitBaseUrl) {
+               this.gitDevBaseUrl = gitBaseUrl;
+       }
 }