Closed miawgogo closed 6 years ago
Thank you for your work. However, please don't add an unnecessary 'auth type' configuration variable forcing reuse of the password field. Just add a token config field and use whichever is available. Additionally, please test and fix your errors.
I'll try to add a CI build configuration soon, getting the OpenWRT toolchain running is a bit of a hassle.
@mueslo do you really need the entire tool chain? I wonder if we can't just mock up some functions and see if the script returns the expected value? maybe something like https://github.com/sstephenson/bats can be used?
Ive managed to test it by tesing the logic i made in isolation using normal bash, but it should work in ash
@mueslo do you really need the entire tool chain? I wonder if we can't just mock up some functions and see if the script returns the expected value? maybe something like https://github.com/sstephenson/bats can be used?
The OpenWRT SDK/tool chain isn't for testing but rather for building an OpenWRT .ipk package that can be installed, since I'm not seeing any progress on getting this package added to OpenWRT by default. It's definitely overkill since there's no actual compilation necessary, but I don't see an easier alternative.
I couldn't get this to work because i kept getting "out of range" error on the token
changing it to if [ $hass_token != 0 ]; then
fixed it
@ProjectPatatoe yeah, I'm used to bash and googling busybox sh ash causes google to return stuff for ash
OK, put in @ProjecPatatoe 's fix for that issue
If you have docker-compose installed you can now build a package by running docker-compose run pkgbuild
let me know when you've tested this
I am currently testing this. Seems to be working okay. Nice!
Can you do a release for this so I dont have to build it myself?
I havent been able to test this as i can not get the tool chain setup on Ubuntu on windows but it should work