This is genkan on Raspberry Pi zero wh.
WIP: Write the role of golang files daemon/updateManager, deployment/pushNewVersion and main.go
- Move
updater.shto/home/pi - Add
.genkan.envto/home/pi - Put
genkan_deviceandupdateManagerto/home/pi - Move
*.servicefiles to/etc/systemd/system/ - Enable daemons by
sudo systemctl enable genkan # or genkan-updaterand start it bysudo systemctl start genkan # or genkan-updater
TravisCI releases every job automatically only if the commit has tag.
$ git add .
$ git commit -m "commit message"
$ git tag v_1.0.0
$ git push origin v_1.0.0
genkan.service and genkan-updater.service is files for systemd. They register the 2 jobs as daemons.
They use .genkan.env as an environment file. Don't forget to put it properly because it's very hard to debug what happens if it's forgotten...
Cross-compile is realized by goxc and the compiled binary is uploaded to GitHub Releases.
After upload, a MQTT message will be published to genkan/update with version number as a payload by pushNewVersion.