Skip to content

Commit

Permalink
Fixed Github deployment & Documented build process
Browse files Browse the repository at this point in the history
  • Loading branch information
wiomoc committed Dec 23, 2019
1 parent 24aad46 commit 4ab4b86
Show file tree
Hide file tree
Showing 3 changed files with 15 additions and 6 deletions.
10 changes: 5 additions & 5 deletions .travis.yml
Original file line number Diff line number Diff line change
Expand Up @@ -24,6 +24,8 @@ before_install:
- rm libwebsockets3_1.2.2-1_amd64.deb
- sudo apt install -y mosquitto mosquitto-clients

script: cargo build --verbose --release; cargo test --verbose

after_success: |
cargo install cargo-kcov &&
mkdir kcov &&
Expand All @@ -34,16 +36,14 @@ after_success: |
cargo kcov --all -v --coveralls --no-clean-rebuild &&
echo "Uploaded code coverage"
before_deploy:
- cp target/debug/libmosquitto_jwt_auth.so libmosquitto_jwt_auth.so
deploy:
provider: releases
skip_cleanup: true
api_key:
secure: MsOQjpV5QdqOUqG8qJOPJ8IZ5wXARq9y0SDHbqVX2W13vJx3n1sYkbFYTQcuionL5HtMve62AsE+TrRbaUSUob9aytqjOU8eFH095aqpG6ZZh+CzDOnuirVs0WPIizU9zHtzAQT7YcbN59hvivJwnZ03w7SWS129zuoY3VNiOCAgq0h8jmUH/weFc+CuiohhCPXhvTOTuOIemMbnS6r1CTq2hzpj0mdrXRMEwInBpTV8vhOR3TLruIWObHHijW6wnCt0ROobDWq+MaY+3tv3jsdTLJKH++U00c1h3XIznFIyb6GZM2MHkjMsOebHnMnkHqj7Sgi8sbvXsdVazCD/mH4QVrjRuOxuYpWJ700hUnezahuK4uRk62rRr/oc383CBJri2fuXv2V8SY9rPgQAmn0VwSEk7Sys7jmlQ59Y8SYrwMpgFpJjxqrNMU9jOYnSU7O+9IjoD5z5GC8wTRtw+jyzXjm7FcU+/W0fT0yCYdbYGPCs0epc8jB/Na+A14M/y8AcFR86DvOjsv5ko1hWw/yROPR9Y9N/f6unVgCgf90osxLFP6NE8KxSC+CZI2ZAbtll3iwxuPfZxRYanT7g+MgqWnwRJhzrlb/W40NSEX5XT+8+mq1E5aD/O0FBLi54NDK/GuUelaL99S1YPxCcmFvSnXoRZ+dehhHckluPktE=
file_glob: true
file:
- libmosquitto_jwt_auth.so
- target/release/libmosquitto_jwt_auth.*
on:
repo: wiomoc/mosquitto-jwt-auth
tags: true
after_deploy:
- rm libmosquitto_jwt_auth.so
9 changes: 9 additions & 0 deletions Readme.md
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,16 @@
Simple Plugin for Mosquitto which enables authentication and authorisation via JWT as MQTT password.

Requires at least Mosquitto v1.6.3

## Building
**Prebuild** version is available [here](https://github.com/wiomoc/mosquitto-jwt-auth/releases/latest)

1. If not done yet, [install Rust](https://www.rust-lang.org/tools/install)
2. Clone `git clone [email protected]:wiomoc/mosquitto-jwt-auth.git`
3. Build `cargo build --release`, on success plugin should be located at `target/release/libmosquitto_jwt_auth.so`

## Configuration
`auth_plugin` should point to the path of `libmosquitto_jwt_auth.so`

| Property | Valid values | Usage |
|--------------------|------|-------|
Expand Down
2 changes: 1 addition & 1 deletion tests/tests.rs
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,7 @@ fn test_valid() {
"-m", "abc"])
.output()
.unwrap()
.stderr[..], b"Connection Refused: not authorised.\n"[..]);
.stderr[..], b"Connection error: Connection Refused: not authorised.\n"[..]);

assert!(child.try_wait().unwrap().is_none());
child.kill().unwrap();
Expand Down

0 comments on commit 4ab4b86

Please sign in to comment.