1 | # meshblu-connector-deployer
|
2 | [![Build Status](https://travis-ci.org/octoblu/meshblu-connector-packager.svg?branch=master)](https://travis-ci.org/octoblu/meshblu-connector-packager)
|
3 | [![Code Climate](https://codeclimate.com/github/octoblu/meshblu-connector-packager/badges/gpa.svg)](https://codeclimate.com/github/octoblu/meshblu-connector-packager)
|
4 | [![Test Coverage](https://codeclimate.com/github/octoblu/meshblu-connector-packager/badges/coverage.svg)](https://codeclimate.com/github/octoblu/meshblu-connector-packager)
|
5 | [![npm version](https://badge.fury.io/js/.svg)](http://badge.fury.io/js/)
|
6 | [![Gitter](https://badges.gitter.im/octoblu/help.svg)](https://gitter.im/octoblu/help)
|
7 |
|
8 |
|
9 | ### Manual Usage:
|
10 |
|
11 | ```bash
|
12 | npm install --global meshblu-connector-packager
|
13 | cd /path/to/meshblu-connector-{connector-name}
|
14 | meshblu-connector-packager
|
15 | ```
|
16 |
|
17 | ### Installation
|
18 |
|
19 | ```bash
|
20 | cd /path/to/meshblu-connector-{connector-name}
|
21 | npm install --save-dev meshblu-connector-packager
|
22 | ```
|
23 |
|
24 | Add the following to your package.json
|
25 |
|
26 | ```json
|
27 | {
|
28 | "scripts": {
|
29 | "package": "meshblu-connector-packager"
|
30 | },
|
31 | "meshbluConnector": {
|
32 | "connectorInstallerVersion": "latest",
|
33 | "dependencyManagerVersion": "latest",
|
34 | "ignitionVersion": "v1.0.6",
|
35 | "githubSlug": "octoblu/meshblu-connector-{connector-name}",
|
36 | "schemasUrl": "https://raw.githubusercontent.com/octoblu/meshblu-connector-{connector-name}/{schema-tag}/schemas.json"
|
37 | }
|
38 | }
|
39 | ```
|
40 |
|
41 | ### Example Travis Usage
|
42 |
|
43 | ```yml
|
44 | language: cpp
|
45 | os:
|
46 | - linux
|
47 | - osx
|
48 | addons:
|
49 | apt:
|
50 | sources:
|
51 | - ubuntu-toolchain-r-test
|
52 | packages:
|
53 | - g++-4.8
|
54 | - g++-4.8-multilib
|
55 | - gcc-multilib
|
56 | - build-essential
|
57 | env:
|
58 | matrix:
|
59 | - PACKAGER_NODE_VERSION="5.5" PACKAGER_ARCH="amd64" MAIN_BUILD="true"
|
60 | - PACKAGER_NODE_VERSION="5.5" PACKAGER_ARCH="386"
|
61 | matrix:
|
62 | exclude:
|
63 | - os: osx
|
64 | env: PACKAGER_NODE_VERSION="5.5" PACKAGER_ARCH="386"
|
65 | branches:
|
66 | only:
|
67 | - "/^v[0-9]/"
|
68 | before_install:
|
69 | - PACKAGER_URL="https://meshblu-connector.octoblu.com/tools/packager/latest"
|
70 | - curl -fsS "${PACKAGER_URL}/travis_install_node.sh" -o /tmp/travis_install_node.sh
|
71 | - chmod +x /tmp/travis_install_node.sh
|
72 | - ". /tmp/travis_install_node.sh"
|
73 | - if [ "$TRAVIS_OS_NAME" == "linux" -a "$MAIN_BUILD" == "true" ]; then export NPM_PUBLISH="true"; fi
|
74 | install:
|
75 | - npm install --build-from-source
|
76 | script:
|
77 | - npm test
|
78 | before_deploy:
|
79 | - npm run package
|
80 | deploy:
|
81 | - provider: releases
|
82 | api_key:
|
83 | secure: "secure-api-key"
|
84 | file:
|
85 | - "deploy/*"
|
86 | skip_cleanup: true
|
87 | on:
|
88 | tags: true
|
89 | - provider: npm
|
90 | email: serveradmin@octoblu.com
|
91 | api_key:
|
92 | secure: "secure-api-key"
|
93 | on:
|
94 | tags: true
|
95 | condition: "$NPM_PUBLISH = true"
|
96 | ```
|
97 |
|
98 | *Don't forget to encrypt and add your NPM Key and Github Oauth Token*
|