forked from AresMUSH/aresmush
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathrelease.rb
28 lines (19 loc) · 802 Bytes
/
release.rb
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
release_version = ARGV[0]
if (!release_version)
puts "USAGE: release <version> (e.g. 1.0)"
exit
end
$LOAD_PATH.unshift(File.join(File.dirname(__FILE__), *%w[engine]))
require 'fileutils'
require 'aresmush'
File.open('version.txt', 'w') do |file|
file.puts release_version
end
File.open(File.join('..', 'ares-webportal', 'public', 'scripts', 'aresweb_version.js'), 'w') do |file|
file.puts "var aresweb_version = \"#{release_version}\";"
end
dest = File.join(AresMUSH.root_path, 'install', 'game.distr')
FileUtils.cp_r File.join(AresMUSH.game_path, 'config'), dest
FileUtils.cp_r File.join(AresMUSH.game_path, 'styles'), dest
FileUtils.cp_r File.join(AresMUSH.game_path, 'text'), dest
FileUtils.cp_r File.join(AresMUSH.game_path, 'uploads', 'theme_images'), File.join(dest, 'uploads')