This repository contains helper scripts for the development of osiota.
- Create App - Create a repository for your osiota based app
- Maintanance - Maintance your app
- Migrate App - Migrate existing repository
Follow the next steps, to create a new osiota app based on the template repository. Using the template repository simplifies the maintaince of the base files. Most steps were automated by separate scripts located in the osiota-dev project.
npx osiota-dev-new-module ../osiota-app-NAME
cd ../osiota-app-NAME
Create (oder adapt) you osiota based application.
And run:
npm install
You may as well commit your changes.
If you need to create the schema.json
file, run for each osiota entry script file (here file.js
):
npx osiota-dev-create-schema file.js
vim file-schema.json
And adapt it and the package file:
npx osiota-dev-adapt-ps
npm run doc
Don't forget to commit:
git add package.json schema.json *-schema.json README.md
git commit -m "+package, schema and readme"
Go to github and create a repository. We recommand using the same name as before.
git remote add origin git@github.com:MYNAME/osiota-app-NAME.git
git push --set-upstream origin master
ALTERNATIVE: If you are part of the osiota development team, you can use a helper script to create the repository automatically:
npx osiota-dev-upload-to-github-group
npx osiota-dev-publish
Update README:
npm run doc
Update package.json
npx osiota-dev-adapt-ps
A small change: 1.2.X
which just fixes something
npx osiota-dev-publish patch
A normal change: 1.X.0
which adds an additional feature
npx osiota-dev-publish minor
A big step: X.0.0
which is INCOMPATIBLE with the versions before.
npx osiota-dev-publish major
To update your repository to the newest version of the template repository:
npx osiota-dev-merge-base-repo
If you already have a git repository, providing an osiota app, you can migrate the commits with the following commands:
First you need the osiota-dev project:
git clone https://github.com/osiota/osiota-dev
Now clone and adapt an existing repository:
./osiota-dev/migrate-module git@gitlab.nerdbox.de:energy-router/REPO.git [osiota-app-NEWNAME]
cd osiota-app-NEWNAME
Follow step 2 and following of section Create app.
This software is released under the MIT license.
Please note that this project is released with a Contributor Code of Conduct. By participating in this project you agree to abide by its terms.