-
Notifications
You must be signed in to change notification settings - Fork 41
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
chore: Update sdk name and version to Flutter (#73)
- Loading branch information
1 parent
d777ad1
commit 1d273d7
Showing
9 changed files
with
81 additions
and
7 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
3 changes: 3 additions & 0 deletions
3
android/src/main/kotlin/com/posthog/posthog_flutter/PostHogVersion.kt
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,3 @@ | ||
package com.posthog.posthog_flutter | ||
|
||
internal val postHogVersion = "4.0.0-alpha.1" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,11 @@ | ||
// | ||
// PostHogFlutterVersion.swift | ||
// posthog_flutter | ||
// | ||
// Created by Manoel Aranda Neto on 08.01.24. | ||
// | ||
|
||
import Foundation | ||
|
||
// This property is internal only | ||
internal let postHogFlutterVersion = "4.0.0-alpha.1" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,20 @@ | ||
#!/bin/bash | ||
|
||
# ./scripts/bump-version.sh <new version> | ||
# eg ./scripts/bump-version.sh "3.0.0-alpha.1" | ||
|
||
set -eux | ||
|
||
SCRIPT_DIR="$( cd "$( dirname "${BASH_SOURCE[0]}" )" && pwd )" | ||
cd $SCRIPT_DIR/.. | ||
|
||
NEW_VERSION="$1" | ||
|
||
# Replace iOS `postHogFlutterVersion` with the given version | ||
perl -pi -e "s/postHogFlutterVersion = \".*\"/postHogFlutterVersion = \"$NEW_VERSION\"/" ios/Classes/PostHogFlutterVersion.swift | ||
|
||
# Replace Android `postHogVersion` with the given version | ||
perl -pi -e "s/postHogVersion = \".*\"/postHogVersion = \"$NEW_VERSION\"/" android/src/main/kotlin/com/posthog/posthog_flutter/PostHogVersion.kt | ||
|
||
# Replace Flutter `version` with the given version | ||
perl -pi -e "s/^version: .*/version: $NEW_VERSION/" pubspec.yaml |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,14 @@ | ||
#!/bin/bash | ||
set -euo pipefail | ||
|
||
SCRIPT_DIR="$( cd "$( dirname "${BASH_SOURCE[0]}" )" && pwd )" | ||
cd $SCRIPT_DIR/.. | ||
|
||
if [[ $(git status) == *"nothing to commit"* ]]; then | ||
echo "Nothing to commit." | ||
else | ||
echo "Going to push the changes." | ||
git fetch | ||
git commit -am "Update version" | ||
git push | ||
fi |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,14 @@ | ||
#!/bin/bash | ||
|
||
set -eux | ||
|
||
SCRIPT_DIR="$( cd "$( dirname "${BASH_SOURCE[0]}" )" && pwd )" | ||
cd $SCRIPT_DIR/.. | ||
|
||
NEW_VERSION="$1" | ||
|
||
# bump version | ||
./scripts/bump-version.sh $NEW_VERSION | ||
|
||
# commit changes | ||
./scripts/commit-code.sh |