Rakefiles: cleanup - removed `REPOSITORYSET` variable
authorJan Vrany <jan.vrany@fit.cvut.cz>
Mon, 18 Jun 2018 22:46:28 +0100
changeset 238 8d6be42520be
parent 237 69ab924b97bf
child 240 c002a607e884
Rakefiles: cleanup - removed `REPOSITORYSET` variable This variable is no longer used as repository set is now constructed automatically based on repository from where rakefiles have been cloned. This seems to be much more flexible and robust.
build.rb
rakelib/setup.rake
--- a/build.rb	Fri Jun 15 23:59:15 2018 +0200
+++ b/build.rb	Mon Jun 18 22:46:28 2018 +0100
@@ -20,11 +20,6 @@
       self.class.const_set('BUILD_TARGET', value)  
     end
 
-    opts.on('-r', '--repository-set REPOSET', "Repository set to use. Overrides repository set specified by the environment variable.") do | value |
-      ENV['REPOSITORYSET'] = value
-      self.class.const_set('REPOSITORYSET', value)  
-    end    
-
     opts.on(nil, '--help', "Prints this message") do
       puts DOCUMENTATION
       puts optparse.help()
@@ -34,14 +29,7 @@
 
   optparse.parse!
 
-  # Make sure a repository set is defined. make it an error if not. 
-  if not ENV['REPOSITORYSET'] then
-    puts "ERROR: Repository set not specified. "
-    puts "       Use --repository-set option or set REPOSITORYSET environment"
-    exit 126
-  end
-
-  # If run outside a Jenkins build environment (such as from a command line), 
+    # If run outside a Jenkins build environment (such as from a command line), 
   # define some variables to make it look more like a proper  Jenkins build 
   # environment. 
   ENV['WORKSPACE'] ||= '.'
--- a/rakelib/setup.rake	Fri Jun 15 23:59:15 2018 +0200
+++ b/rakelib/setup.rake	Mon Jun 18 22:46:28 2018 +0100
@@ -40,8 +40,6 @@
   end
 end
 
-unless defined? REPOSITORYSET; REPOSITORYSET = (ENV['REPOSITORYSET'] || 'default') end
-
 unless File.exist? BUILD_DIR / 'stx-config.rake'
   if defined? PROJECT
     mkdir_p BUILD_DIR
@@ -57,8 +55,7 @@
 #
 COMMENT
       f.puts "unless defined? PROJECT; PROJECT='#{PROJECT}'; end"
-      f.puts "unless defined? BUILD_TARGET; BUILD_TARGET = '#{BUILD_TARGET}'; end"
-      f.puts "unless defined? REPOSITORYSET; REPOSITORYSET='#{REPOSITORYSET}'; end"
+      f.puts "unless defined? BUILD_TARGET; BUILD_TARGET = '#{BUILD_TARGET}'; end"      
       if defined? PROJECT_DIRS
         f.puts "unless defined? PROJECT_DIRS; PROJECT_DIRS='#{PROJECT_DIRS}'; end"
       end