Skip to content

Instantly share code, notes, and snippets.

@RichardBronosky
Last active August 29, 2015 14:15
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save RichardBronosky/e840d5734a66316e54b8 to your computer and use it in GitHub Desktop.
Save RichardBronosky/e840d5734a66316e54b8 to your computer and use it in GitHub Desktop.
Running "cordovaBuild:statesman:android" (cordovaBuild) task
>> Error: Error: ENOENT, no such file or directory '/Users/bruno/src/mm/newspaper-app/projects/statesman/platforms/android/src/com/mm/cmg/newspaper/statesman'
>> at Error (native)
>> at Object.fs.readdirSync (fs.js:765:18)
>> at android_parser.update_from_config (/usr/local/lib/node_modules/cordova/node_modules/cordova-lib/src/cordova/metadata/android_parser.js:285:25)
>> at android_parser.update_project (/usr/local/lib/node_modules/cordova/node_modules/cordova-lib/src/cordova/metadata/android_parser.js:349:14)
>> at /usr/local/lib/node_modules/cordova/node_modules/cordova-lib/src/cordova/prepare.js:122:27
>> at Array.map (native)
>> at /usr/local/lib/node_modules/cordova/node_modules/cordova-lib/src/cordova/prepare.js:65:40
>> at _fulfilled (/usr/local/lib/node_modules/cordova/node_modules/q/q.js:787:54)
>> at self.promiseDispatch.done (/usr/local/lib/node_modules/cordova/node_modules/q/q.js:816:30)
>> at Promise.promise.promiseDispatch (/usr/local/lib/node_modules/cordova/node_modules/q/q.js:749:13)
Done, without errors.
Error: ENOENT, no such file or directory '/Users/bruno/src/mm/newspaper-app/projects/statesman/platforms/android/src/com/cmgdigital/Statesman'
at Error (native)
at Object.fs.readdirSync (fs.js:765:18)
at android_parser.update_from_config (/usr/local/lib/node_modules/cordova/node_modules/cordova-lib/src/cordova/metadata/android_parser.js:285:25)
at android_parser.update_project (/usr/local/lib/node_modules/cordova/node_modules/cordova-lib/src/cordova/metadata/android_parser.js:349:14)
at /usr/local/lib/node_modules/cordova/node_modules/cordova-lib/src/cordova/prepare.js:122:27
at Array.map (native)
at /usr/local/lib/node_modules/cordova/node_modules/cordova-lib/src/cordova/prepare.js:65:40
at _fulfilled (/usr/local/lib/node_modules/cordova/node_modules/q/q.js:787:54)
at self.promiseDispatch.done (/usr/local/lib/node_modules/cordova/node_modules/q/q.js:816:30)
at Promise.promise.promiseDispatch (/usr/local/lib/node_modules/cordova/node_modules/q/q.js:749:13)
## No bash script should be considered releasable until it has this!
## origin: https://gist.github.com/RichardBronosky/5222338
## usage (vim): :0r !curl -sL http://j.mp/safebash
# Exit if any statement returns a non-true return value (non-zero).
set -o errexit
# Exit on use of an uninitialized variable
set -o nounset
cd $HOME/src/mm/newspaper-app
npm install; bower install
# doing either of these next 2 steps breaks the grunt build:production:statesman:android process
#rm -rf projects/statesman/platforms/android/src/com/mm
#sed -i '' -e 's/com.mm.cmg.newspaper.statesman/com.cmgdigital.AASBreakingNews/g' projects/statesman/platforms/android/AndroidManifest.xml projects/statesman/platforms/android/res/xml/config.xml projects/statesman/platforms/ios/Statesman/config.xml projects/statesman/platforms/ios/Statesman/Statesman-Info.plist projects/statesman/plugins/android.json projects/statesman/plugins/ios.json
cd projects/statesman/platforms/android
android update project -p . --subprojects --target 'android-19'
cd CordovaLib
android update project -p . --subprojects --target 'android-19'
cd xwalk_core_library
android update project -p . --subprojects --target 'android-19'
cd $HOME/src/mm/newspaper-app
grunt build:production:statesman:android
cd projects/statesman/platforms/android/
cordova build android --release
alldigitalsign.sh ant-build/Statesman-release-unsigned.apk
apk_fingerprint ant-build/aligned.signed.Statesman-release-unsigned.apk
## No bash script should be considered releasable until it has this!
## origin: https://gist.github.com/RichardBronosky/5222338
## usage (vim): :0r !curl -sL http://j.mp/safebash
# Exit if any statement returns a non-true return value (non-zero).
set -o errexit
# Exit on use of an uninitialized variable
set -o nounset
cd $HOME/src/mm/newspaper-app
../nuke.sh
../build.sh
## No bash script should be considered releasable until it has this!
## origin: https://gist.github.com/RichardBronosky/5222338
## usage (vim): :0r !curl -sL http://j.mp/safebash
# Exit if any statement returns a non-true return value (non-zero).
set -o errexit
# Exit on use of an uninitialized variable
set -o nounset
cd $HOME/src/mm/newspaper-app
git checkout master .; git clean -fdx
find projects/statesman/platforms/android -name build.xml -delete || true
find projects/statesman/platforms/android -name "ant*" -prune -exec rm -rf {} \; || true
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment