new make
This commit is contained in:
+2
-2
@@ -9,7 +9,7 @@ APP_ROOT="#{HOME}/Documents/workspace/mozo"
|
||||
APP_ASSET_ROOT="#{APP_ROOT}/www/assets"
|
||||
app_config_path = File.join(APP_ROOT, 'config.xml')
|
||||
app_config = File.read(app_config_path)
|
||||
app_index_html_path = File.join(APP_ASSET_ROOT, 'index.html')
|
||||
app_index_html_path = File.join(APP_ROOT, 'www/index.html')
|
||||
app_index_html = File.read(app_index_html_path)
|
||||
current_version = app_config.match(/version="([\.\d]+)"/)[1].to_version
|
||||
new_version = File.read("config/version").strip.to_version
|
||||
@@ -61,4 +61,4 @@ end
|
||||
|
||||
# Set app versions
|
||||
File.open(app_config_path, 'w+'){|f| f.puts app_config.sub(%[version="#{current_version}"], %[version="#{new_version}"])}
|
||||
File.open(app_index_html_path, 'w+'){ |f| f.puts app_index_html.sub('##APP_VERSION##', new_version.to_s) }
|
||||
File.open(app_index_html_path, 'w+'){ |f| f.puts app_index_html.sub(/$app_version\s*=\s*'([\.\d]+)'/, "$app_version = '#{new_version.to_s}'") }
|
||||
|
||||
Reference in New Issue
Block a user