From 6b89c14a5144e290e55d041bc0ad03756a113ae0 Mon Sep 17 00:00:00 2001 From: mob-sakai Date: Sun, 27 May 2018 20:15:27 +0900 Subject: [PATCH] initial commit --- .github_changelog_generator | 2 + .gitignore | 37 +++++++++++++++++ CHANGELOG.md | 4 ++ LICENSE.txt | 7 ++++ README.md | 2 + package.json | 10 +++++ release.sh | 79 +++++++++++++++++++++++++++++++++++++ 7 files changed, 141 insertions(+) create mode 100644 .github_changelog_generator create mode 100644 .gitignore create mode 100644 CHANGELOG.md create mode 100644 LICENSE.txt create mode 100644 README.md create mode 100644 package.json create mode 100755 release.sh diff --git a/.github_changelog_generator b/.github_changelog_generator new file mode 100644 index 0000000..60bb9a9 --- /dev/null +++ b/.github_changelog_generator @@ -0,0 +1,2 @@ +issues-wo-labels=false +pr-wo-labels=false \ No newline at end of file diff --git a/.gitignore b/.gitignore new file mode 100644 index 0000000..40f5742 --- /dev/null +++ b/.gitignore @@ -0,0 +1,37 @@ +[Ll]ibrary/ +[Tt]emp/ +[Oo]bj/ +[Bb]uild/ +/[Bb]uilds/ +/Assets/AssetStoreTools* + +# Autogenerated VS/MD solution and project files +ExportedObj/ +*.csproj +*.unityproj +*.sln +*.suo +*.tmp +*.user +*.userprefs +*.pidb +*.booproj +*.svd + + +# Unity3D generated meta files +*.pidb.meta + +# Unity3D Generated File On Crash Reports +sysinfo.txt + +# Mac +*.DS_Store + +# Builds +*.apk + + +# Packages +*.unitypackage +.vs diff --git a/CHANGELOG.md b/CHANGELOG.md new file mode 100644 index 0000000..d0e2fb1 --- /dev/null +++ b/CHANGELOG.md @@ -0,0 +1,4 @@ +# Changelog + + +\* *This Changelog was automatically generated by [github_changelog_generator](https://github.com/skywinder/Github-Changelog-Generator)* \ No newline at end of file diff --git a/LICENSE.txt b/LICENSE.txt new file mode 100644 index 0000000..6c53273 --- /dev/null +++ b/LICENSE.txt @@ -0,0 +1,7 @@ +Copyright 2018 mob-sakai + +Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions: + +The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. \ No newline at end of file diff --git a/README.md b/README.md new file mode 100644 index 0000000..6019f92 --- /dev/null +++ b/README.md @@ -0,0 +1,2 @@ +ParticleForUGUI +=== \ No newline at end of file diff --git a/package.json b/package.json new file mode 100644 index 0000000..f0c3aaa --- /dev/null +++ b/package.json @@ -0,0 +1,10 @@ +{ + "name": "ParticleForUGUI", + "version": "0.1.0", + "repository": { + "type": "git", + "url": "git+https://github.com/mob-sakai/ParticleForUGUI.git" + }, + "src": "Assets/Coffee/UIExtensions/UIParticle", + "license": "MIT" +} diff --git a/release.sh b/release.sh new file mode 100755 index 0000000..334dfdc --- /dev/null +++ b/release.sh @@ -0,0 +1,79 @@ +#!/bin/bash -e + +# NOTE: Set an environment variable `CHANGELOG_GITHUB_TOKEN` by running the following command at the prompt, or by adding it to your shell profile (e.g., ~/.bash_profile or ~/.zshrc): +# export CHANGELOG_GITHUB_TOKEN="«your-40-digit-github-token»" + +# Release the project with the following steps: +# 1. Update the release version in package.json. +# 2. Open unity project to check compile error. +# 3. Update "CHANGELOG.md" using "github_changelog_generator-1.15.0.pre.rc". +# 4. Check changelog and continue proccess. +# 5. Export unitypackage. +# 6. Commit package.json and CHANGELOG.md. +# 7. Merge into master branch. +# 8. Release using "gh-release-3.2.0". (with upload unitypackage) + + +# input release version +echo -e ">> Start Github Release:" +PACKAGE_NAME=`node -pe 'require("./package.json").name'` +echo -e ">> Package name: ${PACKAGE_NAME}" +CURRENT_VERSION=`grep -o -e "\"version\".*$" package.json | sed -e "s/\"version\": \"\(.*\)\".*$/\1/"` +read -p "[? release version (for current: ${CURRENT_VERSION}): " RELEASE_VERSION +[ -z "${RELEASE_VERSION}" ] && exit + + +# update version in package.json +echo -e "\n>> Update version... package.json" +git checkout -B release develop +sed -i -e "s/\"version\": \(.*\)/\"version\": \"${RELEASE_VERSION}\",/g" package.json + + +# check unity editor +UNITY_VER=`sed -e "s/m_EditorVersion: \(.*\)/\1/g" ProjectSettings/ProjectVersion.txt` +UNITY_EDITOR="/Applications/Unity/Hub/Editor/${UNITY_VER}/Unity.app/Contents/MacOS/Unity" +echo -e "\n>> Check unity editor... ${UNITY_VER} (${UNITY_EDITOR})" +"$UNITY_EDITOR" -quit -batchmode -projectPath "`pwd`" -buildOSX64Player "build.app" +echo -e ">> OK" + + +# generate change log +CHANGELOG_GENERATOR_ARG=`grep -o -e ".*git\"$" package.json | sed -e "s/^.*\/\([^\/]*\)\/\([^\/]*\).git.*$/--user \1 --project \2/"` +CHANGELOG_GENERATOR_ARG="--future-release v${RELEASE_VERSION} ${CHANGELOG_GENERATOR_ARG}" +echo -e "\n>> Generate change log... ${CHANGELOG_GENERATOR_ARG}" +github_changelog_generator ${CHANGELOG_GENERATOR_ARG} + +git diff -- CHANGELOG.md +read -p "[? is the change log correct? (y/N):" yn +case "$yn" in [yY]*) ;; *) exit ;; esac + + +# export unitypackage +PACKAGE_SRC=`node -pe 'require("./package.json").src'` +echo -e "\n>> Export unitypackage... ${PACKAGE_SRC}" +"$UNITY_EDITOR" -quit -batchmode -projectPath "`pwd`" -exportpackage "$PACKAGE_SRC" "$PACKAGE_NAME.unitypackage" +echo -e ">> OK" + +# commit release files +echo -e "\n>> Commit release files..." +git add CHANGELOG.md -f +git add package.json -f +git commit -m "update change log" + + +# merge and push +echo -e "\n>> Merge and push..." +git checkout master +git merge --no-ff release -m "release $TAG" +git branch -D release +git push origin master +git checkout develop +git merge --ff master +git push origin develop + + +# upload unitypackage and release on Github +gh-release --assets "$PACKAGE_NAME.unitypackage" + + +echo -e "\n\n>> $PACKAGE_NAME v$RELEASE_VERSION has been successfully released!\n"