Skip to content

Commit

Permalink
Update travis to build for cordova as well (#191)
Browse files Browse the repository at this point in the history
* Update travis to build for cordova as well

* Update travis

* Add nvm

* Update

* Update

* Remove node.js

* Add android

* Update

* Update the travis

* Add mobile

* Add mobile

* Accept license

* Update the deploy

* Update travis for deploying

* Fix

* remove platforms from git
  • Loading branch information
torabian authored Apr 8, 2018
1 parent 53ae548 commit 4379f39
Show file tree
Hide file tree
Showing 158 changed files with 38,895 additions and 55 deletions.
110 changes: 67 additions & 43 deletions .travis.yml
Original file line number Diff line number Diff line change
@@ -1,43 +1,67 @@
language: node_js
node_js:
- "9"

branches:
only:
- master

before_script:
- npm install -g @angular/cli

cache:
yarn: true
directories:
- $HOME/.yarn-cache
- node_modules

dist: trusty
addons:
chrome: stable

before_install:
- export CHROME_BIN=/usr/bin/google-chrome
- export DISPLAY=:99.0
- sh -e /etc/init.d/xvfb start
- sudo apt-get update
- sudo apt-get install -y libappindicator1 fonts-liberation
- wget https://dl.google.com/linux/direct/google-chrome-stable_current_amd64.deb
- sudo dpkg -i google-chrome*.deb
- sudo sysctl fs.inotify.max_user_watches=524288
- sudo sysctl fs.inotify.max_queued_events=524288
- sudo sysctl -p

script:
- npm run lint
- npm run build
- npm run build:mock
- npm run ci

notifications:
email:
on_failure: change
on_success: change
matrix:
include:
- language: node_js
node_js:
- '9'
branches:
only:
- master
before_script:
- npm install -g @angular/cli
cache:
yarn: true
directories:
- "$HOME/.yarn-cache"
- node_modules
dist: trusty
addons:
chrome: stable
before_install:
- export CHROME_BIN=/usr/bin/google-chrome
- export DISPLAY=:99.0
- sh -e /etc/init.d/xvfb start
- sudo apt-get update
- sudo apt-get install -y libappindicator1 fonts-liberation
- wget https://dl.google.com/linux/direct/google-chrome-stable_current_amd64.deb
- sudo dpkg -i google-chrome*.deb
- sudo sysctl fs.inotify.max_user_watches=524288
- sudo sysctl fs.inotify.max_queued_events=524288
- sudo sysctl -p
script:
- npm run lint
- npm run build
- npm run build:mock
- npm run ci
- language: android
android:
components:
- tools
notifications:
email: false
before_install:
- yes | sdkmanager "platforms;android-26"
install:
- nvm install 9
- npm install
- npm install -g cordova
- echo y | android update sdk -u --filter android-22,android-23
before_deploy:
- git config --local user.name "TravisBuildAgent"
- git config --local user.email "[email protected]"
- git tag "$(date +'%Y%m%d%H%M%S')-$(git log --format=%h -1)"
deploy:
provider: releases
api_key:
secure: hu/XAmiqTJDH+4rGGEgTZATXIlX/9RjYTq3wS2+1ltnmEqNmKuImCLpz4W+Gd2WLa4nE04zVZONSjVwLjx1eNKO/mM5TPMT4NL2zZsEGDkKXajBRe+WiyZafvVZTNfbmTxmPnOoQQW0I3IjNVPEltx6dwBny0423cqkQcR9ORxGgZNvL+Ic/AuHEahQmdZzP74gk2hWFNh75U4sN2O0vstWqH2c1EU3owk0NYaw/1QMfy0Mk5sI7/87tlae8AuZ6wqWIkCYuUQHnEDfyYva3Qj0vPnde4fLvf+MOiDZ1y+uuFP44LjjjFdMntOIeGq8SU+7OrwWyU7t/wbB8e+VXqjnjzxoWEIw0xWtRXi+sPpVcKJgyhayJu5+eJlj3LK22rMKtzRhLg2lTG1xOBL7YLHnanBFPAyZRVGtPH9YFEFcwuJvDLXoQQVuZWy+nOtAxvsBxKf4fPFGXVfnigRdtZrx/7yauVUVer1rJndxsRNrGhIBFrVzLiP5Xg701Lc1XDLk1XxCEEv7HOj0OEiP8jL+FZL0q3JXO2C2yE1X/fLJ3pPFLmHBqbMTNYkQs7LhtVmtN0aKcGosvRChVeFQjevkG23se2wxHuIbx3NMz9ipumzuHUt+TZQOaTn3TqxUmo1b7Uim5hKZKMq6CTGyPoOjHywQDo76gZxj6ZMpAtZ8=
file: "/home/travis/build/owsolutions/angular5-iot-dashboard/mobile/platforms/android/app/build/outputs/apk/release/app-release-unsigned.apk"
on:
repo: owsolutions/angular5-iot-dashboard
before_script:
- cordova platform rm android
- cordova platform add android
script:
- cd mobile
- cordova prepare
- cordova build android --release -- --ant
release:
- exit 0
28 changes: 28 additions & 0 deletions mobile/config.xml
Original file line number Diff line number Diff line change
@@ -0,0 +1,28 @@
<?xml version='1.0' encoding='utf-8'?>
<widget id="com.esam.ngiot" version="1.0.0" xmlns="http://www.w3.org/ns/widgets" xmlns:cdv="http://cordova.apache.org/ns/1.0">
<name>ng-iot</name>
<description>
A sample Apache Cordova application that responds to the deviceready event.
</description>
<author email="[email protected]" href="http://cordova.io">
Apache Cordova Team
</author>
<content src="index.html" />
<access origin="*" />
<allow-intent href="http://*/*" />
<allow-intent href="https://*/*" />
<allow-intent href="tel:*" />
<allow-intent href="sms:*" />
<allow-intent href="mailto:*" />
<allow-intent href="geo:*" />
<platform name="android">
<allow-intent href="market:*" />
</platform>
<platform name="ios">
<allow-intent href="itms:*" />
<allow-intent href="itms-apps:*" />
</platform>
<plugin name="cordova-plugin-whitelist" spec="^1.3.3" />
<engine name="browser" spec="^5.0.3" />
<engine name="android" spec="^7.0.0" />
</widget>
23 changes: 23 additions & 0 deletions mobile/hooks/README.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,23 @@
<!--
#
# Licensed to the Apache Software Foundation (ASF) under one
# or more contributor license agreements. See the NOTICE file
# distributed with this work for additional information
# regarding copyright ownership. The ASF licenses this file
# to you under the Apache License, Version 2.0 (the
# "License"); you may not use this file except in compliance
# with the License. You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing,
# software distributed under the License is distributed on an
# "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
# KIND, either express or implied. See the License for the
# specific language governing permissions and limitations
# under the License.
#
-->
# Cordova Hooks

Cordova Hooks represent special scripts which could be added by application and plugin developers or even by your own build system to customize cordova commands. See Hooks Guide for more details: http://cordova.apache.org/docs/en/edge/guide_appdev_hooks_index.md.html#Hooks%20Guide.
15 changes: 15 additions & 0 deletions mobile/plugins/android.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
{
"prepare_queue": {
"installed": [],
"uninstalled": []
},
"config_munge": {
"files": {}
},
"installed_plugins": {
"cordova-plugin-whitelist": {
"PACKAGE_NAME": "com.esam.ngiot"
}
},
"dependent_plugins": {}
}
15 changes: 15 additions & 0 deletions mobile/plugins/browser.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
{
"prepare_queue": {
"installed": [],
"uninstalled": []
},
"config_munge": {
"files": {}
},
"installed_plugins": {
"cordova-plugin-whitelist": {
"PACKAGE_NAME": "com.esam.ngiot"
}
},
"dependent_plugins": {}
}
37 changes: 37 additions & 0 deletions mobile/plugins/cordova-plugin-whitelist/CONTRIBUTING.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,37 @@
<!--
#
# Licensed to the Apache Software Foundation (ASF) under one
# or more contributor license agreements. See the NOTICE file
# distributed with this work for additional information
# regarding copyright ownership. The ASF licenses this file
# to you under the Apache License, Version 2.0 (the
# "License"); you may not use this file except in compliance
# with the License. You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing,
# software distributed under the License is distributed on an
# "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
# KIND, either express or implied. See the License for the
# specific language governing permissions and limitations
# under the License.
#
-->

# Contributing to Apache Cordova

Anyone can contribute to Cordova. And we need your contributions.

There are multiple ways to contribute: report bugs, improve the docs, and
contribute code.

For instructions on this, start with the
[contribution overview](http://cordova.apache.org/contribute/).

The details are explained there, but the important items are:
- Sign and submit an Apache ICLA (Contributor License Agreement).
- Have a Jira issue open that corresponds to your contribution.
- Run the tests so your patch doesn't break existing functionality.

We look forward to your contributions!
Loading

0 comments on commit 4379f39

Please sign in to comment.