Skip to content

Commit

Permalink
Update HyperTrack SDK to 6.4.2 (#19)
Browse files Browse the repository at this point in the history
Add git hook to check plugin.xml version.
Update CONTRIBUTING.
  • Loading branch information
pavel-kuznetsov-hypertrack authored Jun 15, 2023
1 parent 2b735ec commit ecf0c27
Show file tree
Hide file tree
Showing 8 changed files with 33 additions and 11 deletions.
13 changes: 13 additions & 0 deletions .githooks/pre-push
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
# Read the version from package.json
package_version=$(cat package.json | grep -m 1 "\"version\"" | awk -F: '{gsub(/[", ]/, "", $2); print $2}')

# Read the version from plugin.xml
plugin_version=$(cat plugin.xml | tail -n +2 | grep -o 'version="[^"]*"' | head -n 1 | sed 's/version="//' | sed 's/"//')

# Compare the versions
if [ "$package_version" != "$plugin_version" ]; then
echo "Error: Version mismatch!"
echo "Package.json version: $package_version"
echo "Plugin.xml version: $plugin_version"
exit 1
fi
6 changes: 5 additions & 1 deletion .justfile
Original file line number Diff line number Diff line change
@@ -1,4 +1,8 @@
release:
hooks:
chmod +x .githooks/pre-push
git config core.hooksPath .githooks

release: hooks
npm publish --dry-run
@echo "THIS IS DRY RUN. Check if everything is ok and then run 'npm publish'. Checklist:"
@echo "\t- check the release steps in CONTRIBUTING"
5 changes: 5 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,11 @@
The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/),
and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html).

## [1.0.2] - 2023-06-15

### Changed
- Updated HyperTrack Android SDK to 6.4.2

## [1.0.1] - 2023-06-01

### Changed
Expand Down
12 changes: 6 additions & 6 deletions CONTRIBUTING.md
Original file line number Diff line number Diff line change
Expand Up @@ -6,22 +6,22 @@

1. Update SDK version constant
- Android
- src/android/HypertrackPlugin.gradle
- [src/android/HypertrackPlugin.gradle](src/android/HypertrackPlugin.gradle)
- HYPERTRACK_SDK_VERSION
- iOS
- plugin.xml
- [plugin.xml](plugin.xml)
- `<platform name="ios">`
- `<pod name="HyperTrack" version="**version**"/>`

2. Update wrapper version
- package.json
- [package.json](package.json)
- version
- plugin.xml
- [plugin.xml](plugin.xml)
- version

3. Update CHANGELOG
3. Update [CHANGELOG](CHANGELOG.md)

4. Update the README badge
4. Update the [README](README.md) badge

5. Do the release dry run with `just release` and verify that the release is correct (checklist is in the command output)

Expand Down
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
![GitHub](https://img.shields.io/github/license/hypertrack/cordova-plugin-hypertrack.svg)
![npm](https://img.shields.io/npm/v/cordova-plugin-hypertrack-v3.svg)
[![iOS SDK](https://img.shields.io/badge/iOS%20SDK-4.16.0-brightgreen.svg)](https://cocoapods.org/pods/HyperTrack)
![Android SDK](https://img.shields.io/badge/Android%20SDK-6.4.0-brightgreen.svg)
![Android SDK](https://img.shields.io/badge/Android%20SDK-6.4.2-brightgreen.svg)

[HyperTrack](https://www.hypertrack.com/) lets you add live location tracking to your mobile app. Live location is made available along with ongoing activity, tracking controls and tracking outage with reasons.

Expand Down
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
{
"version": "1.0.1",
"version": "1.0.2",
"name": "cordova-plugin-hypertrack-v3",
"cordova_name": "Cordova HyperTrack Plugin",
"description": "Cordova Plugin for native HyperTrack SDKs",
Expand Down
2 changes: 1 addition & 1 deletion plugin.xml
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
<plugin xmlns="http://apache.org/cordova/ns/plugins/1.0"
xmlns:android="http://schemas.android.com/apk/res/android"
id="cordova-plugin-hypertrack-v3"
version="1.0.0">
version="1.0.2">
<name>HyperTrackPlugin</name>
<description>Cordova HyperTrack Plugin is a wrapper around native iOS and Android SDKs that allows to integrate HyperTrack into Cordova apps.</description>
<license>MIT</license>
Expand Down
2 changes: 1 addition & 1 deletion src/android/HyperTrackPlugin.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ def ANDROID_FCM_VERSION = System.getenv('ANDROID_FCM_VERSION') ?: rootProject.ha
buildscript {

ext {
HYPERTRACK_SDK_VERSION = '6.4.0'
HYPERTRACK_SDK_VERSION = '6.4.2'
ANDROID_GRADLE_TOOLS_VERSION = System.getenv('ANDROID_GRADLE_TOOLS_VERSION') ?: rootProject.hasProperty('ANDROID_GRADLE_TOOLS_VERSION') ? rootProject.ext.ANDROID_GRADLE_TOOLS_VERSION : '3.5.3'
ANDROID_GOOGLE_SERVICES_VERSION = System.getenv('ANDROID_GOOGLE_SERVICES_VERSION') ?: rootProject.hasProperty('ANDROID_GOOGLE_SERVICES_VERSION') ? rootProject.ext.ANDROID_GOOGLE_SERVICES_VERSION : '4.3.3'
ext.gradleNumberVersion = ANDROID_GRADLE_TOOLS_VERSION.substring(0, ANDROID_GRADLE_TOOLS_VERSION.lastIndexOf(".")).toFloat()
Expand Down

0 comments on commit ecf0c27

Please sign in to comment.