@target_dir = Pathname.new(ARGV.shift || '.')
proj_info = api.get_project target_proj # check project existance
- Pathname.glob(@target_dir+'*').each do |pdir|
+ Pathname.glob(@target_dir+'*').sort.each do |pdir|
unless load_variables(pdir).package_id
logger.info "Createing new package '#{pdir.basename}'"
if @dry_run
$stdout.puts "New package '#{pinfo.name}' has been created; #{pinfo.url}"
end
- Pathname.glob(pdir + '*').each do |rdir|
+ Pathname.glob(pdir + '*').sort.each do |rdir|
vars = load_variables(rdir)
rinfo = nil
if vars.release_id
$stdout.puts "New release '#{rinfo.name}' has been created; #{rinfo.url}"
end
- Pathname.glob(rdir + '*').each do |file|
+ Pathname.glob(rdir + '*').sort.each do |file|
if file.directory?
logger.error "Skip direcotry #{file}"
next