Skip to content

Commit

Permalink
Fix webos rake task. Move appinfo.json to top level.
Browse files Browse the repository at this point in the history
  • Loading branch information
booch committed Feb 11, 2013
1 parent 558d76a commit 374c3a6
Show file tree
Hide file tree
Showing 6 changed files with 50 additions and 2,576 deletions.
4 changes: 1 addition & 3 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,4 @@
# Ignore files that Rails generates for us.
public/index.html
public/assets/*
webos/index.html
webos/assets/*
webos/*.ipk
webos
19 changes: 19 additions & 0 deletions appinfo.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,19 @@
{
"title": "BoochReader",
"version": "0.0.2",
"id": "com.boochtek.reader",
"vendor": "BoochTek, LLC",
"vendorurl": "http://www.boochtek.com",
"type": "web",
"uiRevision": "2",
"main": "index.html",
"noDeprecatedStyles": true,
"icon": "icons/medium.jpg",
"miniicon": "icons/small.jpg",
"keywords": ["feed reader", "RSS", "feeds", "reader", "Twitter", "Google Reader"],
"noWindow": false,
"plug-ins": false,
"tapToShareSupported": false,
"theme": "light",
"dockMode": true
}
8 changes: 8 additions & 0 deletions lib/tasks/rails.rake
Original file line number Diff line number Diff line change
Expand Up @@ -43,3 +43,11 @@ namespace :app do
%x(curl http://localhost:3000/index.html > public/index.html)
end
end

def phonegap_dir
%x(ls -1trd phonegap-*).split(/\n/).last
end

def phonegap_version
phonegap_dir.split('-').last
end
28 changes: 22 additions & 6 deletions lib/tasks/webos.rake
Original file line number Diff line number Diff line change
@@ -1,14 +1,30 @@
namespace :webos do
desc 'Build the app for WebOS'
task :build => ['app:build'] do
%x(mkdir -p webos/assets)
desc 'Build the app for WebOS.'
task :build => ['app:build', 'webos:clean'] do
# Copy over the stuff from PhoneGap/Cordova.
%x(cp #{phonegap_dir}/lib/webos/lib/cordova.webos.js webos/js/cordova-#{phonegap_version}.js)

# TODO: Build the appinfo.json file, based on global configuration info (like version number).
%x(cp -a appinfo.json webos/)

# Copy over our app. TODO: This is generic PhoneGap stuff.
%x(cp -a public/index.html webos/)
%x(cp -a public/assets/*.{js,css,png} webos/assets/)
%x(cd webos && palm-package .)
%x(cp -a public/assets/*.js webos/js/)
%x(cp -a public/assets/*.css webos/css/)
%x(cp -a public/assets/*.{png,ico,gif} webos/images/)

# Build the package.
%x(palm-package webos)
%x(mv *.ipk webos}
end

desc 'Clean the WebOS output directory.'
task :clean do
%x(rm -rf webos)
%x(mkdir -p webos/{js,css,images})
end

desc 'Deploy the latest build of the app to an attached WebOS device'
desc 'Deploy the latest build of the app to an attached WebOS device.'
task :deploy do
%x(palm-install #{ipk_file})
end
Expand Down
Empty file removed webos/assets/.gitkeep
Empty file.
Loading

0 comments on commit 374c3a6

Please sign in to comment.