Skip to content

Commit

Permalink
Add release/distribution management
Browse files Browse the repository at this point in the history
  • Loading branch information
Scrin committed Apr 30, 2019
1 parent d1f07aa commit d5a8b37
Show file tree
Hide file tree
Showing 3 changed files with 127 additions and 7 deletions.
64 changes: 64 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,64 @@
# Changelog

### v0.2.3

- Added advanced configuration options for InfluxDB

### v0.2.2

- Fixed a rare crash when hcidump was returning invalid data

### v0.2.1

- Support for data format 5 ("RAW v2")

## v0.2.0

- Major refactoring in the application logic
- Changed the preferred format how data is saved to InfluxDB
- Added new configuration properties and changed some old ones
- Added the ability to give (human readable) friendly names for tags

##### --- Migrating from a pre-v.0.2.0 version:

Versions prior to v0.2.0 use single-value measurements, v0.2.0 uses multi-value measurements by default (for a limited time you can use the legacy format by changing that in the config). To migrate from a version prior to v0.2.0:

- If you are using a custom config, copy the new ruuvi-collector.properties.example and replace your existing ruuvi-collector.properties and change the values you need. Some properties have their names changed and some new ones are added.
- If you want to give names to your tags (in your existing measurements as well as future measurements), copy the ruuvi-names.properties.example to ruuvi-names.properties (in the same directory) as the collector and edit the file accordingly.
- Run the collector with `migrate` parameter to migrate existing data to the new format: `java -jar ruuvi-collector-*.jar migrate` and let it run, this may take a long time if you have a lot of data or have a slow system (ie. Raspberry PI).
- The log should say something like this once the migration is finished:

```
2017-11-19 13:46:29.416 INFO [InfluxDataMigrator] Starting query threads...
2017-11-19 13:46:30.023 INFO [InfluxDataMigrator] Processing...
2017-11-19 13:47:52.012 INFO [InfluxDataMigrator] Finished migration! 912816 measurements migrated, took 82.823 seconds (11021.286357654275 measurements per second)
2017-11-19 13:47:52.016 INFO [InfluxDataMigrator] accelerationX discarded: 0
2017-11-19 13:47:52.016 INFO [InfluxDataMigrator] accelerationY discarded: 0
2017-11-19 13:47:52.016 INFO [InfluxDataMigrator] accelerationZ discarded: 0
2017-11-19 13:47:52.016 INFO [InfluxDataMigrator] battery discarded: 0
2017-11-19 13:47:52.017 INFO [InfluxDataMigrator] humidity discarded: 0
2017-11-19 13:47:52.017 INFO [InfluxDataMigrator] pressure discarded: 0
2017-11-19 13:47:52.017 INFO [InfluxDataMigrator] rssi discarded: 0
2017-11-19 13:47:52.017 INFO [InfluxDataMigrator] temperature discarded: 0
2017-11-19 13:47:52.478 INFO [Main] Clean exit
```

- Ideally you should have 0 discards like in the example above, and the number of measurements migrated should be the amount of measurements you had stored.
- The migrator does *not* delete the old measurements, so if something goes wrong, you can always try again
- When you are happy with the result, you can continue running the collector normally like before, without the migrate argument
- NOTE: as the format in InfluxDB changes, you need to update your applications accordingly (ie. Grafana, choose 'ruuvi_measurements' as the measurement and the desired type as the 'value')

### v0.1.2

- Improved error handling
- Added support for whitelist/blacklist filtering
- Added support for dryrun mode

### v0.1.1

- Support for protocol version 4
- Bugfix related to protocol version 3 with latest weather-station firmware

## v0.1.0

- First public release
27 changes: 21 additions & 6 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -6,19 +6,34 @@ Do note that this library is still being developed so comments, suggestions and

### How to use

1. Clone this repository
2. Build and install the library locally: `mvn clean install`
3. Add the dependency to your project:
1. Add the repository to your pom:

```xml
<repositories>
<repository>
<id>ruuvitag-common-java-mvn-repo</id>
<url>https://raw.github.com/Scrin/ruuvitag-common-java/mvn-repo/</url>
<snapshots>
<enabled>true</enabled>
<updatePolicy>always</updatePolicy>
</snapshots>
</repository>
</repositories>
```

Alternative option: You can also clone this repository, then build and install the library locally with: `mvn clean install`

2. Add the dependency to your project:

```xml
<dependency>
<groupId>fi.tkgwf.ruuvi</groupId>
<artifactId>ruuvi-common</artifactId>
<version>1.0.0</version>
<artifactId>ruuvitag-common</artifactId>
<version>1.0.1</version>
</dependency>
```

4. Use the library in your code:
3. Use the library in your code:

```java
import fi.tkgwf.ruuvi.common.bean.RuuviMeasurement;
Expand Down
43 changes: 42 additions & 1 deletion pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
<modelVersion>4.0.0</modelVersion>
<groupId>fi.tkgwf.ruuvi</groupId>
<artifactId>ruuvitag-common</artifactId>
<version>1.0.0</version>
<version>1.0.1</version>
<packaging>jar</packaging>

<name>RuuviTag Common</name>
Expand All @@ -24,6 +24,7 @@

<properties>
<jdk.version>1.8</jdk.version>
<github.global.server>github</github.global.server>
</properties>

<dependencies>
Expand All @@ -41,6 +42,14 @@
</dependency>
</dependencies>

<distributionManagement>
<repository>
<id>internal.repo</id>
<name>Temporary Staging Repository</name>
<url>file://${project.build.directory}/mvn-repo</url>
</repository>
</distributionManagement>

<build>
<plugins>
<plugin>
Expand All @@ -52,6 +61,38 @@
<target>${jdk.version}</target>
</configuration>
</plugin>
<plugin>
<artifactId>maven-deploy-plugin</artifactId>
<version>2.8.2</version>
<configuration>
<altDeploymentRepository>internal.repo::default::file://${project.build.directory}/mvn-repo</altDeploymentRepository>
</configuration>
</plugin>
<plugin>
<groupId>com.github.github</groupId>
<artifactId>site-maven-plugin</artifactId>
<version>0.11</version>
<configuration>
<message>Maven artifacts for ${project.version}</message>
<noJekyll>true</noJekyll>
<outputDirectory>${project.build.directory}/mvn-repo</outputDirectory>
<branch>refs/heads/mvn-repo</branch>
<includes>
<include>**/*</include>
</includes>
<merge>true</merge>
<repositoryName>ruuvitag-common-java</repositoryName>
<repositoryOwner>Scrin</repositoryOwner>
</configuration>
<executions>
<execution>
<goals>
<goal>site</goal>
</goals>
<phase>deploy</phase>
</execution>
</executions>
</plugin>
</plugins>
</build>
</project>

0 comments on commit d5a8b37

Please sign in to comment.