Improved make process
This commit is contained in:
@@ -119,7 +119,7 @@ en:
|
|||||||
Feedback of your order is given by one or two checks next to your order.
|
Feedback of your order is given by one or two checks next to your order.
|
||||||
feedback:
|
feedback:
|
||||||
title: Feedback
|
title: Feedback
|
||||||
subtitle: We gladly improve our app with your feedback!
|
subtitle: We gladly improve our app using your feedback!
|
||||||
submit: Submit feedback
|
submit: Submit feedback
|
||||||
received: Thank you for your feedback. We appreciate your opinion!
|
received: Thank you for your feedback. We appreciate your opinion!
|
||||||
empty_content: No feedback given
|
empty_content: No feedback given
|
||||||
|
|||||||
+40
-17
@@ -1,23 +1,45 @@
|
|||||||
#!/usr/bin/env bash
|
#!/usr/bin/env ruby
|
||||||
ANDROID_ROOT="$HOME/Documents/workspace/mozo/www/assets"
|
require 'versionomy'
|
||||||
spring stop
|
require 'colorize'
|
||||||
rm -rf $ANDROID_ROOT
|
require 'pry'
|
||||||
mkdir $ANDROID_ROOT
|
class String; def to_version; Versionomy.parse(self) end end
|
||||||
rm -rf public/assets
|
|
||||||
QWAITER_MOBILE_EXPORT=yes RAILS_ENV=user_app bundle exec rake assets:precompile
|
HOME=ENV['HOME']
|
||||||
find public/assets -name "*.gz" -exec rm -f {} \;
|
APP_ROOT="#{HOME}/Documents/workspace/mozo"
|
||||||
./bin/dedigest_assets
|
APP_ASSET_ROOT="#{APP_ROOT}/www/assets"
|
||||||
|
app_config_path = File.join(APP_ROOT, 'config.xml')
|
||||||
|
app_config = File.read(app_config_path)
|
||||||
|
current_version = app_config.match(/version="([\.\d]+)"/)[1].to_version
|
||||||
|
new_version = File.read("config/version").strip.to_version
|
||||||
|
version_increased = false
|
||||||
|
while new_version <= current_version
|
||||||
|
version_increased = true
|
||||||
|
new_version = new_version.bump(:tiny)
|
||||||
|
end
|
||||||
|
puts "Increasing version value to #{new_version}".colorize(:red) if version_increased
|
||||||
|
|
||||||
|
`spring stop`
|
||||||
|
`rm -rf #{APP_ASSET_ROOT}`
|
||||||
|
`mkdir #{APP_ASSET_ROOT}`
|
||||||
|
`rm -rf public/assets`
|
||||||
|
`QWAITER_MOBILE_EXPORT=yes RAILS_ENV=user_app bundle exec rake assets:precompile`
|
||||||
|
`find public/assets -name "*.gz" -exec rm -f {} \\;`
|
||||||
|
`./bin/dedigest_assets`
|
||||||
|
|
||||||
# correct stuff
|
# correct stuff
|
||||||
./bin/user_asset_corrections
|
`./bin/user_asset_corrections`
|
||||||
|
|
||||||
# now move stuff to a cleaned up cordova location
|
# now move stuff to a cleaned up cordova location
|
||||||
cp -r public/assets/user $ANDROID_ROOT/user
|
`cp -r public/assets/user #{APP_ASSET_ROOT}/user`
|
||||||
cp -r public/assets/theme1 $ANDROID_ROOT/theme1
|
`cp -r public/assets/theme1 #{APP_ASSET_ROOT}/theme1`
|
||||||
cp -r public/assets/vendor $ANDROID_ROOT/vendor
|
`cp -r public/assets/vendor #{APP_ASSET_ROOT}/vendor`
|
||||||
find $ANDROID_ROOT/theme1 -name "*.css" -exec rm -f {} \;
|
|
||||||
find $ANDROID_ROOT/theme1 -name "*.js" -exec rm -f {} \;
|
# Theme1 files are not used
|
||||||
find public/assets -iname "font*" -depth 1 -exec cp {} $ANDROID_ROOT \;
|
`find #{APP_ASSET_ROOT}/theme1 -name "*.css" -exec rm -f {} \\;`
|
||||||
|
`find #{APP_ASSET_ROOT}/theme1 -name "*.js" -exec rm -f {} \\;`
|
||||||
|
|
||||||
|
# copy font files
|
||||||
|
`find public/assets -iname "font*" -depth 1 -exec cp {} #{APP_ASSET_ROOT} \\;`
|
||||||
|
|
||||||
# rm -rf public/assets/cmtool;
|
# rm -rf public/assets/cmtool;
|
||||||
# rm -rf public/assets/jquery-ui;
|
# rm -rf public/assets/jquery-ui;
|
||||||
@@ -30,4 +52,5 @@ find public/assets -iname "font*" -depth 1 -exec cp {} $ANDROID_ROOT \;
|
|||||||
# rm -rf public/assets/cartoon;
|
# rm -rf public/assets/cartoon;
|
||||||
# rm -rf public/assets/frames;
|
# rm -rf public/assets/frames;
|
||||||
# QWAITER_MOBILE_EXPORT=yes RAILS_ENV=user_app TEST_HOST=$1 bundle exec rails runner bin/build_mobile_app.rb;
|
# QWAITER_MOBILE_EXPORT=yes RAILS_ENV=user_app TEST_HOST=$1 bundle exec rails runner bin/build_mobile_app.rb;
|
||||||
rm -rf public/assets
|
`rm -rf public/assets`
|
||||||
|
File.open(app_config_path, 'w+'){|f| f.puts app_config.sub(%[version="#{current_version}"], %[version="#{new_version}"])}
|
||||||
|
|||||||
Reference in New Issue
Block a user