Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Feat/track unity sdk version 2 #212

Closed
wants to merge 7 commits into from
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions .github/workflows/linter.yml
Original file line number Diff line number Diff line change
Expand Up @@ -61,3 +61,4 @@ jobs:
VALIDATE_MARKDOWN: false
VALIDATE_GITLEAKS: false
VALIDATE_JSCPD: false
VALIDATE_SHELL_SHFMT: false
2 changes: 1 addition & 1 deletion .github/workflows/tag.yml
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@ jobs:
id: extract_version
run: |
VERSION=$(jq -r .version ./src/Packages/Passport/package.json)
echo "VERSION=$VERSION" >> $GITHUB_ENV
echo "VERSION=$VERSION" >> "$GITHUB_ENV"

- name: Create Tag
uses: negz/create-tag@v1
Expand Down
9 changes: 8 additions & 1 deletion .github/workflows/update-version.yml
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,14 @@ jobs:
run: |
FILE=./src/Packages/Passport/package.json
VERSION=${{ github.event.inputs.version }}
jq --arg version "$VERSION" '.version = $version' "./src/Packages/Passport/package.json" > tmp.$$.json && mv tmp.$$.json "./src/Packages/Passport/package.json"
jq --arg version "$VERSION" '.version = $version' $FILE > tmp.$$.json && mv tmp.$$.json $FILE

- name: Replace engine sdk version string
id: replace_engine_sdk_version
run: |
FILE=./src/Packages/Passport/Runtime/Scripts/Private/Helpers/SdkVersionInfoHelpers.cs
VERSION=${{ github.event.inputs.version }}
sed -i "s/__ENGINE_SDK_VERSION__/$VERSION/g" $FILE

- uses: gr2m/create-or-update-pull-request-action@v1
env:
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
namespace Immutable.Passport.Helpers
{
public class SdkVersionInfoHelpers
{
public static string GetSdkVersionInfo()
{
return "__ENGINE_SDK_VERSION__";
}
}
}

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,7 @@ public class VersionInfo
{
public string engine;
public string engineVersion;
public string engineSdkVersion;
public string platform;
public string platformVersion;
public string deviceModel;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -60,6 +60,7 @@ public async UniTask Init(string clientId, string environment, string redirectUr
{
engine = "unity",
engineVersion = Application.unityVersion,
engineSdkVersion = SdkVersionInfoHelpers.GetSdkVersionInfo(),
platform = Application.platform.ToString(),
platformVersion = SystemInfo.operatingSystem,
deviceModel = SystemInfo.deviceModel
Expand Down
Loading