Skip to content

CI and semantic release #1

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

Merged
merged 4 commits into from
Mar 28, 2019
Merged
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
8 changes: 8 additions & 0 deletions .bumpversion.cfg
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
[bumpversion]
current_version = 0.0.1
commit = True
message = [skip ci] docs: Update version numbers from {current_version} -> {new_version}

[bumpversion:file:Utilities/Constants.cs]
search = {current_version}
replace = {new_version}
97 changes: 97 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,97 @@
# =============== #
# Unity generated #
# =============== #
Temp/
Obj/
UnityGenerated/
Library/

# ===================================== #
# Visual Studio / MonoDevelop generated #
# ===================================== #
ExportedObj/
*.svd
*.userprefs
*.csproj
*.pidb
*.suo
*.sln
*.user
*.unityproj
*.booproj

# ============ #
# OS generated #
# ============ #
.DS_Store
.DS_Store?
._*
.Spotlight-V100
.Trashes
Icon?
ehthumbs.db

# ============== #
# Custom Ignores #
# ============== #

/Clients
Assets/StreamingAssets/Config.json
Assets/StreamingAssets/Config.json.meta
Resources.meta
Scenes.meta
Scripts.meta
ThirdParty.meta
Plugins.meta
Prefabs.meta
Examples.meta
Docs.meta
Art.meta
LICENSE.meta
CHANGELOG.md.meta
README.md.meta
Travis.meta
exclude-filter.txt
exclude-filter.txt.meta
etc.meta
/Travis/UnityTestProject/Assets/StreamingAssets/Config.json
/Travis/UnityTestProject/Assets/StreamingAssets/Config.json.meta
/Travis/UnityTestProject/Assets/StreamingAssets/Config.json.enc.meta
/Config.json
/Config.json.meta
/Config.json.enc.meta
/Travis/build.sh.meta
/Travis/createProject.sh.meta
/Travis/installSDK.sh.meta
/Travis/installTestTools.sh.meta
/Travis/installUnity.sh.meta
/Travis/README.md.meta
/Travis/runTests.sh.meta
/Travis/TravisBuild.cs.meta
Docs/publishing-release.md.meta
*.html.meta
*.md.meta
*.txt.meta
*.ps1.meta
**/.swagger-codegen-ignore
**/.swagger-codegen
/Scripts/Editor/Help/
/Scripts/Editor/Help.meta
*/MRefBuilder.config.meta
Travis.meta
Widgets.meta
ThirdParty.meta
README.md.meta
Plugins.meta
BaseService.cs.meta
CallbackDelegates.cs.meta
Connection.meta
Debug.meta
IBM.Cloud.SDK.asmdef.meta
IBMError.cs.meta
IBMResponse.cs.meta
IBMService.cs.meta
Logging.meta
RequestObject.cs.meta
Tests.meta
Utilities.meta
13 changes: 13 additions & 0 deletions .releaserc
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
{
"branch": "master",
"verifyConditions": ["@semantic-release/changelog", "@semantic-release/git", "@semantic-release/exec"],
"prepare": [
"@semantic-release/changelog",
"@semantic-release/git",
{
"path": "@semantic-release/exec",
"cmd": "bumpversion --current-version ${lastRelease.version} --new-version ${nextRelease.version} patch"
}
],
"publish": ["@semantic-release/github"]
}
32 changes: 32 additions & 0 deletions .travis.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,32 @@
language: node_js
node_js:
- "8.3"
os:
- osx
osx_image: xcode61
rvm:
- 2.2
cache:
directories:
- ./Unity
before_install:
- chmod a+x ./Travis/installUnity.sh
- chmod a+x ./Travis/createProject.sh
- chmod a+x ./Travis/installSDK.sh
# - chmod a+x ./Travis/runTests.sh
- npm install -g [email protected]
install:
- pip install bumpversion
- npm install @semantic-release/exec
- npm install @semantic-release/changelog
- npm install @semantic-release/git
- npm install @semantic-release/github
- ./Travis/installUnity.sh
script:
- ./Travis/createProject.sh
- ./Travis/installSDK.sh
# - ./Travis/runTests.sh
deploy:
- provider: script
skip_cleanup: true
script: npx semantic-release
11 changes: 0 additions & 11 deletions BaseService.cs.meta

This file was deleted.

11 changes: 0 additions & 11 deletions CallbackDelegates.cs.meta

This file was deleted.

7 changes: 0 additions & 7 deletions IBM.Cloud.SDK.asmdef.meta

This file was deleted.

11 changes: 0 additions & 11 deletions IBMError.cs.meta

This file was deleted.

11 changes: 0 additions & 11 deletions IBMResponse.cs.meta

This file was deleted.

11 changes: 0 additions & 11 deletions IBMService.cs.meta

This file was deleted.

56 changes: 56 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,56 @@
# IBM Cloud Unity SDK Core
[![Build Status](https://travis-ci.org/IBM/unity-sdk-core.svg?branch=master)](https://travis-ci.org/IBM/unity-sdk-core/)
[![wdc-community.slack.com](https://wdc-slack-inviter.mybluemix.net/badge.svg)](http://wdc-slack-inviter.mybluemix.net/)
[![semantic-release](https://img.shields.io/badge/%20%20%F0%9F%93%A6%F0%9F%9A%80-semantic--release-e10079.svg)](https://github.com/semantic-release/semantic-release)
[![CLA assistant](https://cla-assistant.io/readme/badge/IBM/unity-sdk-core)](https://cla-assistant.io/IBM/unity-sdk-core)

The IBM Cloud Unity SDK Core is a core project of Unity SDKs generated using the IBM OpenAPI SDK generator. Generated services should use this package as a submodule of their generate Unity SDK.

<details>
<summary>Table of Contents</summary>

* [Before you begin](#before-you-begin)
* [Configuring Unity](#configuring-unity)
* [Getting the IBM Cloud Unity SDK Core and adding it to Unity](#getting-the-ibm-unity-sdk-core-and-adding-it-to-unity)
* [Questions](#questions)
* [Open Source @ IBM](#open-source--ibm)
* [License](#license)
* [Contributing](#contributing)

</details>

## Before you begin
Ensure that you have the following prerequisites:

* [Unity][get_unity]. You can use the **free** Personal edition.

## Configuring Unity
* Change the build settings in Unity (**File > Build Settings**) to any platform except for web player/Web GL. The IBM Watson SDK for Unity does not support Unity Web Player.
* If using Unity 2018.2 or later you'll need to set **Scripting Runtime Version** and **Api Compatibility Level** in Build Settings to **.NET 4.x equivalent**. We need to access security options to enable TLS 1.2.

## Getting the IBM Unity SDK Core and adding it to Unity
The IBM Unity SDK Core is mean to be used as a submodule in other generated Unity SDKs. The selected SDK release will point to a particular commit of the IBM Unity SDK Core. Clone the SDK into your Unity project's Assets directory, and initalize and update submodules.

```bash
$ git clone [unity-sdk-url]
$ cd [unity-sdk-directory]
$ git submodule init
$ git submodule update
```

## Questions

If you are having difficulties using the APIs or have a question about the IBM Watson Services, please ask a question on
[dW Answers](https://developer.ibm.com/answers/questions/ask/?topics=watson)
or [Stack Overflow](http://stackoverflow.com/questions/ask?tags=ibm-watson).

## Open Source @ IBM
Find more open source projects on the [IBM Github Page](http://ibm.github.io/).

## License
This library is licensed under Apache 2.0. Full license text is available in [LICENSE](LICENSE).

## Contributing
See [CONTRIBUTING.md](.github/CONTRIBUTING.md).

[get_unity]: https://unity3d.com/get-unity
11 changes: 0 additions & 11 deletions RequestObject.cs.meta

This file was deleted.

8 changes: 0 additions & 8 deletions Tests.meta

This file was deleted.

8 changes: 0 additions & 8 deletions ThirdParty.meta

This file was deleted.

23 changes: 23 additions & 0 deletions Travis/createProject.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,23 @@
#! /bin/sh
project="unity-sdk-travis"

echo "Attempting to create directory for empty project Travis/UnityTestProject..."
mkdir -p Travis/UnityTestProject

echo "Attempting to create an empty project into Travis/UnityTestProject...."
/Applications/Unity/Unity.app/Contents/MacOS/Unity \
-batchmode \
-nographics \
-silent-crashes \
-logFile $(pwd)/createProject.log \
-createProject $(pwd)/Travis/UnityTestProject \
-quit
if [ $? = 0 ] ; then
echo "Project creation COMPLETED! Exited with $?"
exit 0
else
echo "Project creation FAILED! Exited with $?"
echo 'Logs create project'
cat $(pwd)/createProject.log
exit 1
fi
3 changes: 1 addition & 2 deletions Plugins.meta → Travis/createProject.sh.meta

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

21 changes: 21 additions & 0 deletions Travis/installSDK.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,21 @@
#! /bin/sh
project="unity-sdk-travis"

echo "Attempting to install IBM Unity SDK Core into the test project..."
mkdir -p Travis/UnityTestProject/Assets/Watson/Core
git clone -b $TRAVIS_BRANCH https://github.com/IBM/unity-sdk-core.git Travis/UnityTestProject/Assets/Watson/Core

if [ $? = 0 ] ; then
echo "IBM Unity SDK Core install SUCCEEDED! Exited with $?"

echo "Attempting to create Travis/UnityTestProject/Assets/Scripts/Editor/"
mkdir -p Travis/UnityTestProject/Assets/Scripts/Editor/
if [ $? = 0 ] ; then
echo "Creating Travis/UnityTestProject/Assets/Scripts/Editor/ SUCCEEDED! Exited with $?"
else
echo "Creating Travis/UnityTestProject/Assets/Scripts/Editor/ FAILED! EXITED WITH $?"
fi
else
echo "WDC Unity SDK install FAILED! Exited with $?"
exit 1
fi
3 changes: 1 addition & 2 deletions Logging.meta → Travis/installSDK.sh.meta

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

Loading