abort"HOST must be on the form <hostname>.<site>. You provided '#{host}'."ifhost.scan(/^(\S+)\.(\S+)$/).empty?
...
...
@@ -46,7 +46,7 @@ end
namespace:g5kdo
desc"Generates the JSON files based on the generators, for all sites.\nUse SITE=<SITE-NAME> if you wish to restrict the generation to a specific site.\nUse DRY=1 to simulate the execution."
desc"Generates the JSON files based on the generators, for all sites.\nUse SITE=<SITE-NAME> if you wish to restrict the generation to a specific site.\nUse DRY=yes to simulate the execution."
desc"Generates the oaradmin lines to update the OAR database after a change in the reference repository.\nUse FROM=<SHA-ID> and TO=<SHA-ID> to specify the starting and ending commits.\nUse -s to suppress the 'in directory' announcement."
task:generate=>:environmentdo
ifENV['FROM'].nil?||ENV['FROM'].empty?
@logger.fatal"You MUST specify a commit id from where to start using the FROM=<SHA-ID> argument. Ex: rake -s oar:generate FROM=be9f7338b9750ce675447c13d172157992041ec1 TO=7dc3a4101a657230b7ad0534025a7ca93c905411 2> /dev/null"
@logger.fatal"You MUST specify a commit id from where to start using the FROM=<SHA-ID> argument. Ex: rake -s oar:generate FROM=be9f7338b9750ce675447c13d172157992041ec1 TO=7dc3a4101a657230b7ad0534025a7ca93c905411 2> /dev/null"
exit(1)
end
ENV['TO']||='HEAD'
@logger.info"Analysing changes between #{ENV['FROM']}..#{ENV['TO']}..."