From ecf0c27accf3808fc9a641cf2dea0b7eb4f436f1 Mon Sep 17 00:00:00 2001 From: pavel-kuznetsov-hypertrack <78730314+pavel-kuznetsov-hypertrack@users.noreply.github.com> Date: Thu, 15 Jun 2023 18:15:03 +0300 Subject: [PATCH] Update HyperTrack SDK to 6.4.2 (#19) Add git hook to check plugin.xml version. Update CONTRIBUTING. --- .githooks/pre-push | 13 +++++++++++++ .justfile | 6 +++++- CHANGELOG.md | 5 +++++ CONTRIBUTING.md | 12 ++++++------ README.md | 2 +- package.json | 2 +- plugin.xml | 2 +- src/android/HyperTrackPlugin.gradle | 2 +- 8 files changed, 33 insertions(+), 11 deletions(-) create mode 100755 .githooks/pre-push diff --git a/.githooks/pre-push b/.githooks/pre-push new file mode 100755 index 0000000..c5e9718 --- /dev/null +++ b/.githooks/pre-push @@ -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 diff --git a/.justfile b/.justfile index a56c735..e66a5aa 100644 --- a/.justfile +++ b/.justfile @@ -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" diff --git a/CHANGELOG.md b/CHANGELOG.md index 3a36a3c..66a5fba 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -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 diff --git a/CONTRIBUTING.md b/CONTRIBUTING.md index a9f1aea..cb57651 100644 --- a/CONTRIBUTING.md +++ b/CONTRIBUTING.md @@ -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) - `` - `` 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) diff --git a/README.md b/README.md index f67b152..cb3205b 100644 --- a/README.md +++ b/README.md @@ -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. diff --git a/package.json b/package.json index 8717eaa..aeb3b50 100644 --- a/package.json +++ b/package.json @@ -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", diff --git a/plugin.xml b/plugin.xml index cdfe9b3..7427e45 100644 --- a/plugin.xml +++ b/plugin.xml @@ -2,7 +2,7 @@ + version="1.0.2"> HyperTrackPlugin Cordova HyperTrack Plugin is a wrapper around native iOS and Android SDKs that allows to integrate HyperTrack into Cordova apps. MIT diff --git a/src/android/HyperTrackPlugin.gradle b/src/android/HyperTrackPlugin.gradle index a0ec348..9ff7625 100644 --- a/src/android/HyperTrackPlugin.gradle +++ b/src/android/HyperTrackPlugin.gradle @@ -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()