Skip to content

Commit

Permalink
Merge pull request #2 from ioBroker/master
Browse files Browse the repository at this point in the history
update
  • Loading branch information
Scrounger authored Oct 4, 2019
2 parents f61e368 + 0959100 commit 6e188d5
Show file tree
Hide file tree
Showing 8 changed files with 1,022 additions and 1,781 deletions.
3 changes: 3 additions & 0 deletions .eslintrc.json
Original file line number Diff line number Diff line change
Expand Up @@ -28,5 +28,8 @@
"error",
"always"
]
},
"parserOptions": {
"ecmaVersion": 2018
}
}
25 changes: 19 additions & 6 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,14 @@ And write ```npm run update adapterName``` to write latest version of adapterNam
1. Be sure that the version is tested in forum by users or you fix the critical bug with that.
2. Delete the versionTime or update it to the current time

## Add a new adapter to the latest repository
1. Fork this repo and clone your fork
2. Run `npm i`
3. Run `npm run addToLatest -- --name <adapter-name> --type <adapter-type>`
(replace `<adapter-name>` with your adapter's name and `<adapter-type>` with the adapter type)
4. Push a commit with the changes to `sources-dist.json`
5. Create a PR

## Requirements for adapter to get added to the latest repository

*already required for latest repository*
Expand All @@ -17,7 +25,7 @@ And write ```npm run update adapterName``` to write latest version of adapterNam
2. Do not use in the title the words "ioBroker" or "Adapter". It is clear anyway, that it is adapter for ioBroker.
3. *title* in io-package.json (common) is simple short name of adapter in english. *titleLang* is object that consist short names in many languages. *Lang* ist not german Länge, but english LANGuages.
4. Adapter needs to have a README.md with description, detail information and changelog. English is mandatory. Other languages are welcome. See [Example of README.md](#example-of-readme-md).

**In README.md, there must be a link to the device or the manufacturer's website. Devices must have a photo. Services do not require a photo, but are still welcome.**
5. Adapter must have a predefined license.
6. Please remove www, widgets and docs directories if not used.
Expand All @@ -29,11 +37,18 @@ And write ```npm run update adapterName``` to write latest version of adapterNam
12. iobroker organisation must be added as owner to npm package. [Why and how to do that.](#add-owner-to-packet)
13. Add your adapter into the list (first latest and after that into stable, when tested).
Examples of entries you can find [here](#samples).
*Note*: don't forget to add attribute *published* to **both** repositories.
14. **new!** No new adapters will be accepted to repo without admin3 Configuration dialog. Admin2 dialog is optional!

*Note:* you can watch the video about it (only german) on [youtube](https://www.youtube.com/watch?v=7N8fsJcAdlE)

## Add a new adapter to the stable repository
1. Fork this repo and clone your fork
2. Run `npm i`
3. Run `npm run addToStable -- --name <adapter-name> --version <stable-version>`
(replace `<adapter-name>` with your adapter's name and `<stable-version>` with the version that should be added to the stable repo)
4. Push a commit with the changes to `sources-dist-stable.json`
5. Create a PR

### Requirements for adapter to get added to the stable repository

Additionally to all above listed points:
Expand Down Expand Up @@ -162,7 +177,6 @@ For **latest** (sources-dist.json):
"admin": {
"meta": "https://raw.githubusercontent.com/ioBroker/ioBroker.admin/master/io-package.json",
"icon": "https://raw.githubusercontent.com/ioBroker/ioBroker.admin/master/admin/admin.png",
"published": "2017-04-10T17:10:21.690Z",
"type": "general"
},
```
Expand All @@ -173,9 +187,8 @@ For **stable** (sources-dist-stable.json):
"admin": {
"meta": "https://raw.githubusercontent.com/ioBroker/ioBroker.admin/master/io-package.json",
"icon": "https://raw.githubusercontent.com/ioBroker/ioBroker.admin/master/admin/admin.png",
"version": "2.0.7",
"published": "2017-04-10T17:10:21.690Z",
"type": "general"
"type": "general",
"version": "2.0.7"
},
```

Expand Down
15 changes: 9 additions & 6 deletions gulpfile.js
Original file line number Diff line number Diff line change
@@ -1,12 +1,11 @@
const gulp = require('gulp');
const gulp = require('gulp');
const request = require('request');

// check if all adapters in stable have the version attribute
// and published attribute
gulp.task('init', done => {
const scripts = require('./lib/scripts');
scripts.init(() =>
done());
scripts.init().then(() => done());
});

gulp.task('stable', done => {
Expand Down Expand Up @@ -58,6 +57,10 @@ gulp.task('latest', done => {

gulp.task('sort', done => {
const scripts = require('./lib/scripts');
scripts.sort();
done()
});
scripts.sort().then(done);
});

gulp.task('nodates', done => {
const scripts = require('./lib/scripts');
scripts.nodates().then(done);
});
Loading

0 comments on commit 6e188d5

Please sign in to comment.