Skip to content
This repository has been archived by the owner on Jul 8, 2020. It is now read-only.

Commit

Permalink
work on #213: jenkins.sh --res=set1
Browse files Browse the repository at this point in the history
  • Loading branch information
gruppjo committed Sep 3, 2015
1 parent 24d37cd commit 4049d20
Show file tree
Hide file tree
Showing 3 changed files with 13 additions and 12 deletions.
2 changes: 1 addition & 1 deletion app/templates/gulpfile.js
Expand Up @@ -72,7 +72,7 @@ gulp.task('default', function () {
else if (options.cordovaBuild && options.build === false) {
return gulp.start('cordova-only-resources');
}
// cordova without build
// cordova non-build command
else if (options.cordova) {
return gulp.start('cordova');
}
Expand Down
11 changes: 6 additions & 5 deletions app/templates/jenkins.sh
Expand Up @@ -32,16 +32,17 @@ gulp config --silent --setWidgetAttr="ios-CFBundleVersion=${VERSION}.${BUILD}"
echo -e '\n####################### GULP BUILD #######################\n'
# run gulp build explicitly to make it more obvious what's happening
# build: inject version and build number into app
# build: with dev environment and resources set1
# build: minify
gulp build --buildVars="version:${VERSION},build:${BUILD}" --env=dev --res=set1 --minify
# build: with dev environment and minify
gulp build --buildVars="version:${VERSION},build:${BUILD}" --env=dev --minify

echo -e '\n####################### BUILDING IOS #######################\n'
# --no-build here so we can use the one we just built
gulp --cordova 'prepare ios' --no-build
# provide resources set1
gulp --cordova 'prepare ios' --no-build --res=set1

echo -e '\n######################## BUILDING ANDROID #######################\n'
# --no-build here so we can use the one we just built
gulp --cordova 'build android --release' --no-build
# provide different resources set
gulp --cordova 'build android --release' --no-build --res=set2

echo -e '\n####################### DONE #######################\n'
12 changes: 6 additions & 6 deletions docs/guides/icons_splash_screens.md
Expand Up @@ -7,18 +7,18 @@ For your convenience, Generator-M provides a `res/` folder to put in the icons a

```
res/
|- android
| icon1.png
|- android/
| default/
| ....
|- ios
| icon1.png
|- ios/
| default/
| ....
```

The Generator-M also creates a couple of files and folders. Initially a folder for the android and ios resources with some more example files in them.

## Simple example
For most projects it will suffice to put all the icons and splash screen files in the platform folders and link to them in the `config.xml`.
For most projects it will suffice to put all the icons and splash screen files in the `res/platform/default` folders and link to them in the `config.xml`.

For the simplest example include this in your `config.xml`:

Expand All @@ -37,7 +37,7 @@ And run any of the cordova build related commands (`cordova run, build, emulate,
gulp --cordova 'run ios --device'
```

This will build the app with a custom app icon for android and ios. If you haven't changed the files that Generator-M created, cordova will build the app with the following app icons:
This will build the app with a custom app icon for android and ios. If you haven't changed the files that Generator-M created for you, cordova will build the app with the following app icons:

**Android**
<img height="100px" src="../../app/templates/res/android/default/icon.png" />
Expand Down

0 comments on commit 4049d20

Please sign in to comment.