Skip to content

Commit d5a8b37

Browse files
committed
Add release/distribution management
1 parent d1f07aa commit d5a8b37

File tree

3 files changed

+127
-7
lines changed

3 files changed

+127
-7
lines changed

CHANGELOG.md

Lines changed: 64 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,64 @@
1+
# Changelog
2+
3+
### v0.2.3
4+
5+
- Added advanced configuration options for InfluxDB
6+
7+
### v0.2.2
8+
9+
- Fixed a rare crash when hcidump was returning invalid data
10+
11+
### v0.2.1
12+
13+
- Support for data format 5 ("RAW v2")
14+
15+
## v0.2.0
16+
17+
- Major refactoring in the application logic
18+
- Changed the preferred format how data is saved to InfluxDB
19+
- Added new configuration properties and changed some old ones
20+
- Added the ability to give (human readable) friendly names for tags
21+
22+
##### --- Migrating from a pre-v.0.2.0 version:
23+
24+
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:
25+
26+
- 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.
27+
- 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.
28+
- 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).
29+
- The log should say something like this once the migration is finished:
30+
31+
```
32+
2017-11-19 13:46:29.416 INFO [InfluxDataMigrator] Starting query threads...
33+
2017-11-19 13:46:30.023 INFO [InfluxDataMigrator] Processing...
34+
2017-11-19 13:47:52.012 INFO [InfluxDataMigrator] Finished migration! 912816 measurements migrated, took 82.823 seconds (11021.286357654275 measurements per second)
35+
2017-11-19 13:47:52.016 INFO [InfluxDataMigrator] accelerationX discarded: 0
36+
2017-11-19 13:47:52.016 INFO [InfluxDataMigrator] accelerationY discarded: 0
37+
2017-11-19 13:47:52.016 INFO [InfluxDataMigrator] accelerationZ discarded: 0
38+
2017-11-19 13:47:52.016 INFO [InfluxDataMigrator] battery discarded: 0
39+
2017-11-19 13:47:52.017 INFO [InfluxDataMigrator] humidity discarded: 0
40+
2017-11-19 13:47:52.017 INFO [InfluxDataMigrator] pressure discarded: 0
41+
2017-11-19 13:47:52.017 INFO [InfluxDataMigrator] rssi discarded: 0
42+
2017-11-19 13:47:52.017 INFO [InfluxDataMigrator] temperature discarded: 0
43+
2017-11-19 13:47:52.478 INFO [Main] Clean exit
44+
```
45+
46+
- 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.
47+
- The migrator does *not* delete the old measurements, so if something goes wrong, you can always try again
48+
- When you are happy with the result, you can continue running the collector normally like before, without the migrate argument
49+
- 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')
50+
51+
### v0.1.2
52+
53+
- Improved error handling
54+
- Added support for whitelist/blacklist filtering
55+
- Added support for dryrun mode
56+
57+
### v0.1.1
58+
59+
- Support for protocol version 4
60+
- Bugfix related to protocol version 3 with latest weather-station firmware
61+
62+
## v0.1.0
63+
64+
- First public release

README.md

Lines changed: 21 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -6,19 +6,34 @@ Do note that this library is still being developed so comments, suggestions and
66

77
### How to use
88

9-
1. Clone this repository
10-
2. Build and install the library locally: `mvn clean install`
11-
3. Add the dependency to your project:
9+
1. Add the repository to your pom:
10+
11+
```xml
12+
<repositories>
13+
<repository>
14+
<id>ruuvitag-common-java-mvn-repo</id>
15+
<url>https://raw.github.com/Scrin/ruuvitag-common-java/mvn-repo/</url>
16+
<snapshots>
17+
<enabled>true</enabled>
18+
<updatePolicy>always</updatePolicy>
19+
</snapshots>
20+
</repository>
21+
</repositories>
22+
```
23+
24+
Alternative option: You can also clone this repository, then build and install the library locally with: `mvn clean install`
25+
26+
2. Add the dependency to your project:
1227

1328
```xml
1429
<dependency>
1530
<groupId>fi.tkgwf.ruuvi</groupId>
16-
<artifactId>ruuvi-common</artifactId>
17-
<version>1.0.0</version>
31+
<artifactId>ruuvitag-common</artifactId>
32+
<version>1.0.1</version>
1833
</dependency>
1934
```
2035

21-
4. Use the library in your code:
36+
3. Use the library in your code:
2237

2338
```java
2439
import fi.tkgwf.ruuvi.common.bean.RuuviMeasurement;

pom.xml

Lines changed: 42 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@
33
<modelVersion>4.0.0</modelVersion>
44
<groupId>fi.tkgwf.ruuvi</groupId>
55
<artifactId>ruuvitag-common</artifactId>
6-
<version>1.0.0</version>
6+
<version>1.0.1</version>
77
<packaging>jar</packaging>
88

99
<name>RuuviTag Common</name>
@@ -24,6 +24,7 @@
2424

2525
<properties>
2626
<jdk.version>1.8</jdk.version>
27+
<github.global.server>github</github.global.server>
2728
</properties>
2829

2930
<dependencies>
@@ -41,6 +42,14 @@
4142
</dependency>
4243
</dependencies>
4344

45+
<distributionManagement>
46+
<repository>
47+
<id>internal.repo</id>
48+
<name>Temporary Staging Repository</name>
49+
<url>file://${project.build.directory}/mvn-repo</url>
50+
</repository>
51+
</distributionManagement>
52+
4453
<build>
4554
<plugins>
4655
<plugin>
@@ -52,6 +61,38 @@
5261
<target>${jdk.version}</target>
5362
</configuration>
5463
</plugin>
64+
<plugin>
65+
<artifactId>maven-deploy-plugin</artifactId>
66+
<version>2.8.2</version>
67+
<configuration>
68+
<altDeploymentRepository>internal.repo::default::file://${project.build.directory}/mvn-repo</altDeploymentRepository>
69+
</configuration>
70+
</plugin>
71+
<plugin>
72+
<groupId>com.github.github</groupId>
73+
<artifactId>site-maven-plugin</artifactId>
74+
<version>0.11</version>
75+
<configuration>
76+
<message>Maven artifacts for ${project.version}</message>
77+
<noJekyll>true</noJekyll>
78+
<outputDirectory>${project.build.directory}/mvn-repo</outputDirectory>
79+
<branch>refs/heads/mvn-repo</branch>
80+
<includes>
81+
<include>**/*</include>
82+
</includes>
83+
<merge>true</merge>
84+
<repositoryName>ruuvitag-common-java</repositoryName>
85+
<repositoryOwner>Scrin</repositoryOwner>
86+
</configuration>
87+
<executions>
88+
<execution>
89+
<goals>
90+
<goal>site</goal>
91+
</goals>
92+
<phase>deploy</phase>
93+
</execution>
94+
</executions>
95+
</plugin>
5596
</plugins>
5697
</build>
5798
</project>

0 commit comments

Comments
 (0)