fix: Mention node on readme, drop python requirement

This commit is contained in:
Maciej Krüger 2018-10-21 15:38:41 +02:00
parent 1c7fa57950
commit d7f96ed8cf
3 changed files with 13 additions and 2 deletions

View File

@ -17,7 +17,7 @@ clean:
rm -rf *.img *.model *.manifest snaps
%.model: boards/%.yaml # sign a model file
cat definition.yaml $< | python -c "import sys, yaml, json; json.dump(yaml.load(sys.stdin), sys.stdout, indent=2)" | sed "s|TIMESTAMP|$(shell date -Iseconds --utc)|g" | snap sign -k "$(USER_KEY)" > $@
cat definition.yaml $< | node json2yaml.js | sed "s|TIMESTAMP|$(shell date -Iseconds --utc)|g" | snap sign -k "$(USER_KEY)" > $@
snaps/%: deps/%.yaml
node build-tool.js --env $(ENV) --channel $(CHANNEL) --board $*
.cloud-init.yaml: $(ENV).cloud-init.yaml

View File

@ -10,12 +10,14 @@ Everything subject to change, including number of bugs (hopefully to zero ;)
## System Requirements
To build an image you need to have at least Ubuntu 16.04 on your machine and the following packages installed: `ubuntu-image snapd`
To build an image you need to have at least Ubuntu 16.04 on your machine and the following packages installed: `ubuntu-image snapd nodejs`
Additionally at least 1 GB of free disk space is required
For virtual device testing you also need `qemu-kvm`
Additionally some npm packages are required, run `npm i` to install them
## Other Requirements
- Ubuntu One account

9
json2yaml.js Normal file
View File

@ -0,0 +1,9 @@
'use strict'
const yaml = require('js-yaml')
let d = []
process.stdin.on('data', data => d.push(data))
process.stdin.on('end', () => {
console.log(JSON.stringify(yaml.safeLoad(Buffer.concat(d)), null, 2))
})