Skip to content

Commit

Permalink
Merge pull request #198 from proyecto26/release
Browse files Browse the repository at this point in the history
Support UPM Package
  • Loading branch information
jdnichollsc authored Dec 27, 2021
2 parents 2b1d1b8 + 8d68cc0 commit 196b635
Show file tree
Hide file tree
Showing 23 changed files with 255 additions and 9 deletions.
59 changes: 59 additions & 0 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,59 @@
name: CI
on:
push:
branches:
- master
- release
jobs:
split-upm:
name: split upm branch
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
with:
fetch-depth: 0
- name: split upm branch
run: |
git branch -d upm &> /dev/null || echo upm branch not found # recreate the upm branch each time
git mv "$PKG_ROOT" "src/$UPM_ROOT"
git mv "src/$UPM_ROOT" .
git mv demo/Assets demo/Sample
git mv demo/Sample $UPM_ROOT
git mv doc Docs
git mv Docs $UPM_ROOT
git mv LICENSE $UPM_ROOT
git mv README.md $UPM_ROOT
git mv SECURITY.md $UPM_ROOT
git mv CHANGELOG.md $UPM_ROOT
git mv CONTRIBUTING.md $UPM_ROOT
echo "********************** ROOT **********************"
ls
git add "$UPM_ROOT"
git config --global user.name 'github-bot'
git config --global user.email 'github-bot@users.noreply.github.com'
git commit -m "create release folder"
git subtree split -P "$UPM_ROOT" -b upm # create the upm branch
git checkout upm # checkout the branch
if [[ -d "Sample/Packages" ]]; then
git rm -rf Sample/Packages
git rm Sample/Packages.meta --ignore-unmatch
git rm Sample/packages.config
git rm Sample/packages.config.meta --ignore-unmatch
fi
if [[ -d "Properties" ]]; then
git rm -rf Properties
git rm Properties.meta --ignore-unmatch
git rm Proyecto26.RestClient.csproj
git rm Proyecto26.RestClient.csproj.meta --ignore-unmatch
git rm Proyecto26.RestClient.nuspec
git rm Proyecto26.RestClient.nuspec.meta --ignore-unmatch
git rm packages.config
git rm packages.config.meta --ignore-unmatch
fi
git commit -am "fix: src => root"
echo "********************** ROOT **********************"
ls
git push -u origin upm --force # commit the branch
env:
PKG_ROOT: src/Proyecto26.RestClient
UPM_ROOT: Release
20 changes: 19 additions & 1 deletion CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,23 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0

## [Unreleased]

## [2.6.2] - 2021-12-26

### Added
- Add a progress reporting callback by [@lyze237](https://github.com/lyze237) ([#153](https://github.com/proyecto26/RestClient/pull/153)).
- Add support for **PATCH** verb by [@neegool](https://github.com/neegool) ([#185](https://github.com/proyecto26/RestClient/pull/185)).
- Add solution to make network call on main thread by [@maifeeulasad](https://github.com/maifeeulasad) ([#190](https://github.com/proyecto26/RestClient/pull/190)).
- Add support for UPM package by [@benukhanov](https://github.com/benukhanov), [@tonygiang](https://github.com/tonygiang) and [@Hermesiss](https://github.com/Hermesiss) ([#198](https://github.com/proyecto26/RestClient/pull/198)).

### Changed
- Changes to use **RetryCallback** to handle token expiration by [@fegabe](https://github.com/fegabe) ([#142](https://github.com/proyecto26/RestClient/pull/142)).

### Fixed
- Handle HTTP NO CONTENT status code (204) to prevent null reference exceptions by [@L-Naej](https://github.com/L-Naej) and [@StevenGarberg](https://github.com/StevenGarberg) ([#188](https://github.com/proyecto26/RestClient/pull/188)).

### Removed
- Removing Depricated APIs by [@Drazail](https://github.com/Drazail) ([#164](https://github.com/proyecto26/RestClient/pull/164)).

## [2.6.1] - 2020-06-10

### Fixed
Expand Down Expand Up @@ -142,7 +159,8 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
## [...1.0.1]
Missing tags for previous versions 🤷‍♂

[Unreleased]: https://github.com/proyecto26/RestClient/compare/v2.6.1...HEAD
[Unreleased]: https://github.com/proyecto26/RestClient/compare/v2.6.2...HEAD
[2.6.2]: https://github.com/proyecto26/RestClient/compare/v2.6.1...v2.6.2
[2.6.1]: https://github.com/proyecto26/RestClient/compare/v2.6.0...v2.6.1
[2.6.0]: https://github.com/proyecto26/RestClient/compare/v2.5.9...v2.6.0
[2.5.9]: https://github.com/proyecto26/RestClient/compare/2.5.7...v2.5.9
Expand Down
5 changes: 4 additions & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -79,7 +79,10 @@ Do you want to see this beautiful package in action? Download the demo [here](ht
### Unity package
Download and install the **.unitypackage** file of the latest release published [here](https://github.com/proyecto26/RestClient/releases).

### Nuget package
### UPM package
Make sure you had installed [C# Promise package](https://openupm.com/packages/com.rsg.promise/) or at least have it in your [openupm scope registry](https://openupm.com/). Then install **RestClient package** using this URL from **Package Manager**: `https://github.com/proyecto26/RestClient.git#upm`

### NuGet package
Other option is download this package from **NuGet** with **Visual Studio** or using the **nuget-cli**, a **[NuGet.config](https://github.com/proyecto26/RestClient/blob/master/demo/NuGet.config)** file is required at the root of your **Unity Project**, for example:

```xml
Expand Down
6 changes: 5 additions & 1 deletion src/.gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -52,7 +52,6 @@ artifacts/
*_p.c
*_i.h
*.ilk
*.meta
*.obj
*.pch
*.pdb
Expand All @@ -73,6 +72,11 @@ artifacts/
*.svclog
*.scc

# Unity3D generated meta files
*.pidb.meta
*.pdb.meta
*.mdb.meta

# Chutzpah Test files
_Chutzpah*

Expand Down
9 changes: 9 additions & 0 deletions src/Proyecto26.RestClient/Helpers.meta

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

1 change: 0 additions & 1 deletion src/Proyecto26.RestClient/Helpers/Common.cs
Original file line number Diff line number Diff line change
@@ -1,5 +1,4 @@
using System.Text;
using System.Collections;
using UnityEngine;
using UnityEngine.Networking;

Expand Down
12 changes: 12 additions & 0 deletions src/Proyecto26.RestClient/Helpers/Common.cs.meta

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

12 changes: 12 additions & 0 deletions src/Proyecto26.RestClient/Helpers/ExecuteOnMainThread.cs.meta

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

12 changes: 12 additions & 0 deletions src/Proyecto26.RestClient/Helpers/Extensions.cs.meta

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

12 changes: 12 additions & 0 deletions src/Proyecto26.RestClient/Helpers/HttpBase.cs.meta

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

12 changes: 12 additions & 0 deletions src/Proyecto26.RestClient/Helpers/JsonHelper.cs.meta

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

1 change: 1 addition & 0 deletions src/Proyecto26.RestClient/Helpers/RequestException.cs
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
using System;

namespace Proyecto26
{
public class RequestException : Exception
Expand Down
12 changes: 12 additions & 0 deletions src/Proyecto26.RestClient/Helpers/RequestException.cs.meta

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

12 changes: 12 additions & 0 deletions src/Proyecto26.RestClient/Helpers/RequestHelper.cs.meta

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

3 changes: 2 additions & 1 deletion src/Proyecto26.RestClient/Helpers/RequestHelperExtension.cs
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
using UnityEngine.Networking;
using System;
using UnityEngine.Networking;

namespace Proyecto26
{
Expand Down
12 changes: 12 additions & 0 deletions src/Proyecto26.RestClient/Helpers/RequestHelperExtension.cs.meta

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

12 changes: 12 additions & 0 deletions src/Proyecto26.RestClient/Helpers/ResponseHelper.cs.meta

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

12 changes: 12 additions & 0 deletions src/Proyecto26.RestClient/Helpers/StaticCoroutine.cs.meta

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

2 changes: 1 addition & 1 deletion src/Proyecto26.RestClient/RestClient.cs
Original file line number Diff line number Diff line change
Expand Up @@ -54,10 +54,10 @@ public static void ClearDefaultParams()
DefaultRequestParams.Clear();
}

private static Dictionary<string, string> _defaultRequestHeaders;
/// <summary>
/// Default headers.
/// </summary>
private static Dictionary<string, string> _defaultRequestHeaders;
public static Dictionary<string, string> DefaultRequestHeaders
{
get
Expand Down
12 changes: 12 additions & 0 deletions src/Proyecto26.RestClient/RestClient.cs.meta

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

12 changes: 12 additions & 0 deletions src/Proyecto26.RestClient/RestClientPromise.cs.meta

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

6 changes: 3 additions & 3 deletions src/Proyecto26.RestClient/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -36,9 +36,9 @@
},
"samples": [
{
"displayName": "Demo",
"description": "Demo for RestClient",
"path": "demo"
"displayName": "Sample",
"description": "RestClient Sample",
"path": "Sample"
}
]
}
8 changes: 8 additions & 0 deletions src/Proyecto26.RestClient/package.json.meta

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

0 comments on commit 196b635

Please sign in to comment.