Skip to content

Commit

Permalink
Merge pull request #90 from SideQuestVR/fix/ci
Browse files Browse the repository at this point in the history
Fix CI to correctly manage Samples folder
  • Loading branch information
mikeskydev authored Jan 7, 2025
2 parents 1c72aba + e8147e3 commit db262e4
Show file tree
Hide file tree
Showing 2 changed files with 26 additions and 11 deletions.
25 changes: 18 additions & 7 deletions .github/workflows/publish.yml
Original file line number Diff line number Diff line change
Expand Up @@ -19,24 +19,35 @@ jobs:
TAG=$(jq -r '.version' package.json)
echo "TAG=$TAG" >> $GITHUB_ENV
if git rev-parse $TAG >/dev/null 2>&1; then
echo "TAG_EXISTS=true" >> $GITHUB_ENV
echo "::error::Tag already exists: $TAG"
else
echo "TAG_EXISTS=false" >> $GITHUB_ENV
fi
- name: Samples to Samples~
- name: Publish on UPM branch
run: |
if [[ -d "Samples" ]]; then
git mv Samples Samples~
rm -f Samples.meta
git config --global user.name 'github-bot'
git config --global user.email '[email protected]'
git commit -am "fix: Samples => Samples~"
git push -u origin main
fi
mkdir ../upm
cp -r . ../upm
rm -rf ../upm/.git # don't want to replace git history!
git reset --hard HEAD
git checkout upm
cp -r ../upm/* .
rm -rf ../upm
git config --global user.name 'github-bot'
git config --global user.email '[email protected]'
git commit -am "$TAG" --no-verify
git push -u origin upm
- name: Create Release
if: env.TAG_EXISTS == 'false'
run: |
git tag ${{ env.TAG }} main
git tag ${{ env.TAG }} upm
git push origin --tags
12 changes: 8 additions & 4 deletions Runtime/Scripts/Scene/BanterScene.cs
Original file line number Diff line number Diff line change
Expand Up @@ -870,7 +870,8 @@ public void SetJsObjectActive(string msg, int reqId)
Debug.LogError("[Banter] SetJsObjectActive message is malformed: " + msg);
return;
}
try{
try
{
var banterObject = GetGameObject(int.Parse(msgParts[0]));
if (banterObject != null)
{
Expand All @@ -880,8 +881,10 @@ public void SetJsObjectActive(string msg, int reqId)
SendObjectUpdate(banterObject, reqId);
});
}
}catch(Exception ex){
Debug.LogError("SetJsObjectActive threw an exception: " +msg);
}
catch (Exception ex)
{
Debug.LogError("SetJsObjectActive threw an exception: " + msg);
Debug.LogException(ex);
}
}
Expand Down Expand Up @@ -1055,7 +1058,8 @@ private List<object> SetComponentProperties(int startIndex, string[] parts, Bant
banterComp.UpdateProperty(name, valFloat);
break;
case PropertyType.Int:
if(propParts[2].Equals("null")) {
if (propParts[2].Equals("null"))
{
propParts[2] = "0";
}
var valInt = int.Parse(propParts[2]);
Expand Down

0 comments on commit db262e4

Please sign in to comment.