new make
This commit is contained in:
+1
-1
@@ -1 +1 @@
|
|||||||
0.9.3
|
0.9.5
|
||||||
|
|||||||
+2
-2
@@ -9,7 +9,7 @@ APP_ROOT="#{HOME}/Documents/workspace/mozo"
|
|||||||
APP_ASSET_ROOT="#{APP_ROOT}/www/assets"
|
APP_ASSET_ROOT="#{APP_ROOT}/www/assets"
|
||||||
app_config_path = File.join(APP_ROOT, 'config.xml')
|
app_config_path = File.join(APP_ROOT, 'config.xml')
|
||||||
app_config = File.read(app_config_path)
|
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)
|
app_index_html = File.read(app_index_html_path)
|
||||||
current_version = app_config.match(/version="([\.\d]+)"/)[1].to_version
|
current_version = app_config.match(/version="([\.\d]+)"/)[1].to_version
|
||||||
new_version = File.read("config/version").strip.to_version
|
new_version = File.read("config/version").strip.to_version
|
||||||
@@ -61,4 +61,4 @@ end
|
|||||||
|
|
||||||
# Set app versions
|
# Set app versions
|
||||||
File.open(app_config_path, 'w+'){|f| f.puts app_config.sub(%[version="#{current_version}"], %[version="#{new_version}"])}
|
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