Skip to content

Commit 8d5b49d

Browse files
committed
feat: v1.3.0 changes from release branch
2 parents 975e93a + 00ccdf7 commit 8d5b49d

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

57 files changed

+724
-787
lines changed

.githooks/commit-msg

Lines changed: 23 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,23 @@
1+
#!/bin/sh
2+
3+
COMMIT_MESSAGE="$(head -n1 "$1")"
4+
COMMIT_MESSAGE_REGEX="^(build|chore|ci|docs|feat|fix|perf|refactor|revert|style|test)(\([a-z ]+\))?: .+$"
5+
AUTO_COMMIT_MESSAGE_REGEX="^Merge (pull request|branch) [a-zA-Z0-9#'_/-]+ (of [a-zA-Z0-9#':_. /-]+ )?(from|into) [a-zA-Z0-9#':_. /-]+$"
6+
7+
8+
if [[ $COMMIT_MESSAGE =~ $COMMIT_MESSAGE_REGEX || $COMMIT_MESSAGE =~ $AUTO_COMMIT_MESSAGE_REGEX ]]; then
9+
exit 0
10+
else
11+
echo "Invalid commit message format:"
12+
echo "Your message: '${COMMIT_MESSAGE}'"
13+
echo ""
14+
echo "Please use the following format:"
15+
echo "<type>(<scope>): <subject>"
16+
echo ""
17+
echo " the (<scope>) part is optional"
18+
echo ""
19+
echo "Examples:"
20+
echo "feat(login): add support for email login"
21+
echo "fix: fix issue with user profile image upload"
22+
exit 1
23+
fi

.githooks/pre-commit

Lines changed: 30 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,30 @@
1+
#!/bin/sh
2+
3+
# Gitflow branching and naming strategy enforcement for Windows and Mac
4+
5+
protected_branches="^(main|develop|hotfix/|release/|feature/)"
6+
current_branch=$(git symbolic-ref HEAD | sed 's!refs/heads/!!')
7+
8+
# Ensure the branch name adheres to the Gitflow naming strategy
9+
if ! [[ ${current_branch} =~ ${protected_branches} ]]; then
10+
echo "Error: The current branch '${current_branch}' does not adhere to the Gitflow naming strategy."
11+
echo "Branch names must match the following patterns: main, develop, hotfix/*, release/*, feature/*."
12+
exit 1
13+
fi
14+
15+
# Check if pushing to the correct remote branch
16+
remote_branch=$(git for-each-ref --format='%(upstream:short)' $(git symbolic-ref -q HEAD))
17+
if [[ -z "${remote_branch}" ]]; then
18+
echo "Error: The current branch '${current_branch}' has no tracking remote branch."
19+
exit 1
20+
fi
21+
22+
remote_name=$(echo ${remote_branch} | cut -d/ -f1)
23+
remote_branch_name=$(echo ${remote_branch} | cut -d/ -f2-)
24+
25+
if [[ "${current_branch}" != "${remote_branch_name}" ]]; then
26+
echo "Error: The current branch '${current_branch}' must be pushed to a remote branch with the same name: '${remote_name}/${current_branch}'."
27+
exit 1
28+
fi
29+
30+
exit 0

.github/latest.md

Lines changed: 5 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1,12 +1,11 @@
1-
This update includes an additional popup for the new Quick Start sample, operation completed event and README updates.
1+
This update adds a small improvement to the module installer and a new setup guide editor window flow to help new users get started.
22

33
## Changelog
44

55
### Added
6-
- support for response codes [#62](https://github.com/readyplayerme/rpm-unity-sdk-core/pull/62)
7-
8-
### Updated
9-
- refactor of WebRequestDispatcher [#59](https://github.com/readyplayerme/rpm-unity-sdk-core/pull/59)
6+
- import timeout to module installer [#70](https://github.com/readyplayerme/rpm-unity-sdk-core/pull/70)
7+
- Add new setup guide window [#71](https://github.com/readyplayerme/rpm-unity-sdk-core/pull/71)
8+
- added function for folder size in MB [#72](https://github.com/readyplayerme/rpm-unity-sdk-core/pull/72)
109

1110
### Fixed
12-
- fixed an issue with the popup don't ask again pref was not updating correctly [#58](https://github.com/readyplayerme/rpm-unity-sdk-core/pull/58)
11+
- various editor window layout fixes [#73](https://github.com/readyplayerme/rpm-unity-sdk-core/pull/73)

.github/workflows.meta

Lines changed: 0 additions & 3 deletions
This file was deleted.

.github/workflows/auto-release-action.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -15,5 +15,5 @@ jobs:
1515
- uses: actions/checkout@v2
1616
- uses: ncipollo/release-action@v1
1717
with:
18-
name: "Ready Player Me Unity SDK: Core ${{github.ref_name}}"
18+
name: "${{github.ref_name}}"
1919
bodyFile: ".github/latest.md"
Lines changed: 34 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,34 @@
1+
name: Update unity sdk
2+
on:
3+
pull_request:
4+
branches:
5+
- develop
6+
types: [closed]
7+
8+
jobs:
9+
update-submodule:
10+
if: github.event.pull_request.merged == true
11+
runs-on: ubuntu-latest
12+
steps:
13+
- name: Checkout repo with submodule
14+
uses: actions/checkout@v3
15+
with:
16+
repository: "readyplayerme/Unity-SDK"
17+
submodules: true
18+
fetch-depth: 0
19+
ref: develop
20+
token: ${{ secrets.DEV_SDK_TOKEN }}
21+
22+
- name: Update submodule
23+
run: |
24+
cd Assets/Ready\ Player\ Me/Core
25+
git checkout develop
26+
git pull origin develop
27+
28+
- name: Commit and push changes
29+
run: |
30+
git config --global user.name "dev-sdk"
31+
git config --global user.email "[email protected]"
32+
git add .
33+
git commit -m 'Update submodule'
34+
git push origin develop

CHANGELOG.md

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,16 @@
33
All notable changes to this project will be documented in this file.
44
This project adheres to [Semantic Versioning](http://semver.org/).
55

6+
## [1.3.0] - Unreleased
7+
8+
### Added
9+
- import timeout to module installer [#70](https://github.com/readyplayerme/rpm-unity-sdk-core/pull/70)
10+
- Add new setup guide window [#71](https://github.com/readyplayerme/rpm-unity-sdk-core/pull/71)
11+
- added function for folder size in MB [#72](https://github.com/readyplayerme/rpm-unity-sdk-core/pull/72)
12+
13+
### Fixed
14+
- various editor window layout fixes [#73](https://github.com/readyplayerme/rpm-unity-sdk-core/pull/73)
15+
616
## [1.2.0] - 2023.04.18
717

818
### Added

CONTRIBUTING.md

Lines changed: 12 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -17,6 +17,7 @@ To get an overview of the project, read the [README](README.md). Here are some r
1717
- [Set up Git](https://docs.github.com/en/get-started/quickstart/set-up-git)
1818
- [GitHub flow](https://docs.github.com/en/get-started/quickstart/github-flow)
1919
- [Collaborating with pull requests](https://docs.github.com/en/github/collaborating-with-pull-requests)
20+
- [Code style guide](https://github.com/readyplayerme/rpm-unity-sdk-core/blob/main/style-guidelines.md)
2021

2122

2223
## FAQ
@@ -83,6 +84,15 @@ Scan through our [existing issues](https://github.com/github/docs/issues) to fin
8384

8485
### Commit your update
8586

87+
We encourage following the [Conventional Commits](https://www.conventionalcommits.org/en/v1.0.0/) format when it comes to writing commit messages. Our package repositories come with a .githooks folder that has a commit-msg file that can enforce this.
88+
To set this up you just need to configure git's hookspath folder to point there.
89+
90+
You can do this by
91+
1. Open the terminal
92+
2. Navigate to the root folder of this repository
93+
3. Run the following command
94+
`git config core.hooksPath .githooks`
95+
8696
Commit the changes once you are happy with them. Don't forget to [self-review](#self-review) to speed up the review process:zap:.
8797

8898
### Self review
@@ -92,10 +102,10 @@ You should always review your own PR first.
92102
For content changes, make sure that you:
93103

94104
- [ ] Confirm that the changes meet the user experience and goals outlined in the content design plan (if there is one).
95-
- [ ] Compare your pull request's source changes to staging to confirm that the output matches the source and that everything is rendering as expected. This helps spot issues like typos, content that doesn't follow the style guide, or content that isn't rendering due to versioning problems. Remember that lists and tables can be tricky.
105+
- [ ] Compare your pull request's source changes to staging to confirm that the output matches the source and that everything is rendering as expected. This helps spot issues like typos, content that doesn't follow the [style guide](https://github.com/readyplayerme/rpm-unity-sdk-core/blob/main/style-guidelines.md), or content that isn't rendering due to versioning problems. Remember that lists and tables can be tricky.
96106
- [ ] Review the content for technical accuracy.
97107
- [ ] Review the entire pull request using the [translations guide for writers](./translations/for-writers.md).
98-
- [ ] Copy-edit the changes for grammar, spelling, and adherence to the [style guide](#).
108+
- [ ] Copy-edit the changes for grammar, spelling, and adherence to the [style guide](https://github.com/readyplayerme/rpm-unity-sdk-core/blob/main/style-guidelines.md).
99109
- [ ] Check new or updated Liquid statements to confirm that versioning is correct.
100110
- [ ] If there are any failing checks in your PR, troubleshoot them until they're all passing.
101111

Editor/Analytics/AmplitudeEventLogger.cs

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -43,7 +43,7 @@ public void SetUserProperties()
4343
{ Constants.Properties.RENDER_PIPELINE, appData.RenderPipeline },
4444
{ Constants.Properties.SUBDOMAIN, appData.PartnerName },
4545
{ Constants.Properties.APP_NAME, PlayerSettings.productName },
46-
{ Constants.Properties.SDK_TARGET, "Unity" },
46+
{ Constants.Properties.SDK_TARGET, SDK_TARGET },
4747
{ Constants.Properties.APP_IDENTIFIER, Application.identifier },
4848
{ Constants.Properties.ALLOW_ANALYTICS, true }
4949
};
@@ -74,7 +74,7 @@ public async void LogEvent(string eventName, Dictionary<string, object> eventPro
7474
{
7575
eventData.Add(Constants.AmplitudeKeys.USER_PROPERTIES, userProperties);
7676
}
77-
77+
7878
if (eventProperties != null)
7979
{
8080
eventData.Add(Constants.AmplitudeKeys.EVENT_PROPERTIES, eventProperties);
@@ -133,6 +133,7 @@ private enum Target
133133

134134
private const string PRODUCTION = "unity";
135135
private const string DEVELOPMENT = "unity-dev";
136+
private const string SDK_TARGET = "Unity";
136137

137138
private string GetAnalyticsTarget()
138139
{

Editor/Module Management/ModuleInfo.cs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -29,8 +29,8 @@ public string Identifier
2929
return name;
3030
}
3131
// if branch not set, default to the version in ModuleList
32-
return gitUrl + (string.IsNullOrEmpty(branch) ? $"#v{version}": $"#{branch}");
33-
32+
return gitUrl + (string.IsNullOrEmpty(branch) ? $"#v{version}" : $"#{branch}");
33+
3434
}
3535
}
3636
}

0 commit comments

Comments
 (0)