diff --git a/.gitignore b/.gitignore new file mode 100644 index 0000000..2477be1 --- /dev/null +++ b/.gitignore @@ -0,0 +1,40 @@ +[Ll]ibrary/ +[Tt]emp/ +[Oo]bj/ +[Bb]uild/ +[Bb]uilds/ +Assets/AssetStoreTools* + +# Visual Studio cache directory +.vs/ + +# Autogenerated VS/MD/Consulo solution and project files +ExportedObj/ +.consulo/ +*.csproj +*.unityproj +*.sln +*.suo +*.tmp +*.user +*.userprefs +*.pidb +*.booproj +*.svd +*.pdb +*.opendb + +# Unity3D generated meta files +*.pidb.meta +*.pdb.meta + +# Unity3D Generated File On Crash Reports +sysinfo.txt + +# Builds +*.apk +*.unitypackage + +\.idea/ +/src/*/bin +/src/*/obj \ No newline at end of file diff --git a/.travis.yml b/.travis.yml new file mode 100644 index 0000000..4827c5f --- /dev/null +++ b/.travis.yml @@ -0,0 +1,30 @@ +language: generic + +env: + - MASTER_TARGET_BRANCH=upm DEVELOP_TARGET_BRANCH=upm-dev TEST_TARGET_BRANCH=upm-test TARGET_BRANCH=not_defined TEST_RUN=false FOLDER_TO_EXPORT=Assets + +sudo: required + +before_install: + - | + if [ "$TRAVIS_PULL_REQUEST" != "false" ]; then + TARGET_BRANCH=$TEST_TARGET_BRANCH + elif [ "$TRAVIS_BRANCH" = "develop" ]; then + TARGET_BRANCH=$DEVELOP_TARGET_BRANCH + elif [ "$TRAVIS_BRANCH" = "master" ]; then + TARGET_BRANCH=$MASTER_TARGET_BRANCH + else + TARGET_BRANCH=$TEST_TARGET_BRANCH + fi + +after_success: + - chmod 777 -R Ci + - Ci/move_to_packagebranch.sh + +branches: + only: + - master + - develop + - /^(?i:test).*$/ + except: + - /^(?i:upm).*$/ diff --git a/AssetBundleManager.sln.DotSettings.meta b/AssetBundleManager.sln.DotSettings.meta deleted file mode 100644 index 24db38e..0000000 --- a/AssetBundleManager.sln.DotSettings.meta +++ /dev/null @@ -1,8 +0,0 @@ -fileFormatVersion: 2 -guid: bb411fb7e3a595a4f882b47075eb0d83 -timeCreated: 1524349187 -licenseType: Free -DefaultImporter: - userData: - assetBundleName: - assetBundleVariant: diff --git a/AssetBundleManager.meta b/Assets/AssetBundleManager.meta similarity index 100% rename from AssetBundleManager.meta rename to Assets/AssetBundleManager.meta diff --git a/AssetBundleManager/AssetBundleAsync.cs b/Assets/AssetBundleManager/AssetBundleAsync.cs similarity index 100% rename from AssetBundleManager/AssetBundleAsync.cs rename to Assets/AssetBundleManager/AssetBundleAsync.cs diff --git a/AssetBundleManager/AssetBundleAsync.cs.meta b/Assets/AssetBundleManager/AssetBundleAsync.cs.meta similarity index 100% rename from AssetBundleManager/AssetBundleAsync.cs.meta rename to Assets/AssetBundleManager/AssetBundleAsync.cs.meta diff --git a/AssetBundleManager/AssetBundleDownloader.cs b/Assets/AssetBundleManager/AssetBundleDownloader.cs similarity index 100% rename from AssetBundleManager/AssetBundleDownloader.cs rename to Assets/AssetBundleManager/AssetBundleDownloader.cs diff --git a/AssetBundleManager/AssetBundleDownloader.cs.meta b/Assets/AssetBundleManager/AssetBundleDownloader.cs.meta similarity index 100% rename from AssetBundleManager/AssetBundleDownloader.cs.meta rename to Assets/AssetBundleManager/AssetBundleDownloader.cs.meta diff --git a/AssetBundleManager/AssetBundleDownloaderMonobehaviour.cs b/Assets/AssetBundleManager/AssetBundleDownloaderMonobehaviour.cs similarity index 100% rename from AssetBundleManager/AssetBundleDownloaderMonobehaviour.cs rename to Assets/AssetBundleManager/AssetBundleDownloaderMonobehaviour.cs diff --git a/AssetBundleManager/AssetBundleDownloaderMonobehaviour.cs.meta b/Assets/AssetBundleManager/AssetBundleDownloaderMonobehaviour.cs.meta similarity index 100% rename from AssetBundleManager/AssetBundleDownloaderMonobehaviour.cs.meta rename to Assets/AssetBundleManager/AssetBundleDownloaderMonobehaviour.cs.meta diff --git a/AssetBundleManager/AssetBundleManager.asmdef b/Assets/AssetBundleManager/AssetBundleManager.asmdef similarity index 100% rename from AssetBundleManager/AssetBundleManager.asmdef rename to Assets/AssetBundleManager/AssetBundleManager.asmdef diff --git a/AssetBundleManager/AssetBundleManager.asmdef.meta b/Assets/AssetBundleManager/AssetBundleManager.asmdef.meta similarity index 100% rename from AssetBundleManager/AssetBundleManager.asmdef.meta rename to Assets/AssetBundleManager/AssetBundleManager.asmdef.meta diff --git a/AssetBundleManager/AssetBundleManager.cs b/Assets/AssetBundleManager/AssetBundleManager.cs similarity index 100% rename from AssetBundleManager/AssetBundleManager.cs rename to Assets/AssetBundleManager/AssetBundleManager.cs diff --git a/AssetBundleManager/AssetBundleManager.cs.meta b/Assets/AssetBundleManager/AssetBundleManager.cs.meta similarity index 100% rename from AssetBundleManager/AssetBundleManager.cs.meta rename to Assets/AssetBundleManager/AssetBundleManager.cs.meta diff --git a/AssetBundleManager/AssetBundleUtility.cs b/Assets/AssetBundleManager/AssetBundleUtility.cs similarity index 100% rename from AssetBundleManager/AssetBundleUtility.cs rename to Assets/AssetBundleManager/AssetBundleUtility.cs diff --git a/AssetBundleManager/AssetBundleUtility.cs.meta b/Assets/AssetBundleManager/AssetBundleUtility.cs.meta similarity index 100% rename from AssetBundleManager/AssetBundleUtility.cs.meta rename to Assets/AssetBundleManager/AssetBundleUtility.cs.meta diff --git a/AssetBundleManager/EditorCoroutine.cs b/Assets/AssetBundleManager/EditorCoroutine.cs similarity index 100% rename from AssetBundleManager/EditorCoroutine.cs rename to Assets/AssetBundleManager/EditorCoroutine.cs diff --git a/AssetBundleManager/EditorCoroutine.cs.meta b/Assets/AssetBundleManager/EditorCoroutine.cs.meta similarity index 100% rename from AssetBundleManager/EditorCoroutine.cs.meta rename to Assets/AssetBundleManager/EditorCoroutine.cs.meta diff --git a/AssetBundleManager/Example.meta b/Assets/AssetBundleManager/Example.meta similarity index 100% rename from AssetBundleManager/Example.meta rename to Assets/AssetBundleManager/Example.meta diff --git a/AssetBundleManager/Example/Example1.cs b/Assets/AssetBundleManager/Example/Example1.cs similarity index 100% rename from AssetBundleManager/Example/Example1.cs rename to Assets/AssetBundleManager/Example/Example1.cs diff --git a/AssetBundleManager/Example/Example1.cs.meta b/Assets/AssetBundleManager/Example/Example1.cs.meta similarity index 100% rename from AssetBundleManager/Example/Example1.cs.meta rename to Assets/AssetBundleManager/Example/Example1.cs.meta diff --git a/AssetBundleManager/Example/Example2.cs b/Assets/AssetBundleManager/Example/Example2.cs similarity index 100% rename from AssetBundleManager/Example/Example2.cs rename to Assets/AssetBundleManager/Example/Example2.cs diff --git a/AssetBundleManager/Example/Example2.cs.meta b/Assets/AssetBundleManager/Example/Example2.cs.meta similarity index 100% rename from AssetBundleManager/Example/Example2.cs.meta rename to Assets/AssetBundleManager/Example/Example2.cs.meta diff --git a/AssetBundleManager/ICommandHandler.cs b/Assets/AssetBundleManager/ICommandHandler.cs similarity index 100% rename from AssetBundleManager/ICommandHandler.cs rename to Assets/AssetBundleManager/ICommandHandler.cs diff --git a/AssetBundleManager/ICommandHandler.cs.meta b/Assets/AssetBundleManager/ICommandHandler.cs.meta similarity index 100% rename from AssetBundleManager/ICommandHandler.cs.meta rename to Assets/AssetBundleManager/ICommandHandler.cs.meta diff --git a/AssetBundleManager/StreamingAssetsBundleDownloadDecorator.cs b/Assets/AssetBundleManager/StreamingAssetsBundleDownloadDecorator.cs similarity index 100% rename from AssetBundleManager/StreamingAssetsBundleDownloadDecorator.cs rename to Assets/AssetBundleManager/StreamingAssetsBundleDownloadDecorator.cs diff --git a/AssetBundleManager/StreamingAssetsBundleDownloadDecorator.cs.meta b/Assets/AssetBundleManager/StreamingAssetsBundleDownloadDecorator.cs.meta similarity index 100% rename from AssetBundleManager/StreamingAssetsBundleDownloadDecorator.cs.meta rename to Assets/AssetBundleManager/StreamingAssetsBundleDownloadDecorator.cs.meta diff --git a/Assets/package.json b/Assets/package.json new file mode 100644 index 0000000..42384c4 --- /dev/null +++ b/Assets/package.json @@ -0,0 +1,12 @@ +{ + "name": "asset-bundle-manager", + "displayName": "Asset Bundle Manager", + "version": "0.1.2", + "unity": "2019.1", + "description": "Yet another asset bundle manager for Unity", + "keywords": [ + "unity", + "bundle" + ], + "category": "Instrument" +} diff --git a/Assets/package.json.meta b/Assets/package.json.meta new file mode 100644 index 0000000..9b71670 --- /dev/null +++ b/Assets/package.json.meta @@ -0,0 +1,7 @@ +fileFormatVersion: 2 +guid: 93cc49068083b6e48a91ed637c78ac11 +TextScriptImporter: + externalObjects: {} + userData: + assetBundleName: + assetBundleVariant: diff --git a/Ci/move_to_packagebranch.sh b/Ci/move_to_packagebranch.sh new file mode 100644 index 0000000..c15e7af --- /dev/null +++ b/Ci/move_to_packagebranch.sh @@ -0,0 +1,50 @@ +#!/bin/bash + +#set -e +set -x + +#echo "git push" +REMOTE=$(git config --get remote.origin.url) +echo $REMOTE +COMMIT=$(git log -1 --pretty=%B) +echo $COMMIT + +echo "TARGET_BRANCH is $TARGET_BRANCH" + +git archive -o archive.tar HEAD:$FOLDER_TO_EXPORT +ARCHIVE_PATH=$(pwd) + +mkdir ../$TARGET_BRANCH +cd ../$TARGET_BRANCH + +if [ "$(git ls-remote $REMOTE $TARGET_BRANCH | wc -l)" != 1 ]; then + git clone --depth=1 $REMOTE + cd * + git checkout -b $TARGET_BRANCH +else + git clone --branch=$TARGET_BRANCH $REMOTE + cd * +fi + +shopt -s extglob +rm ./ -dr -- !(.git) + +mv $ARCHIVE_PATH/archive.tar archive.tar + +echo "Archive content:" + +tar -tf archive.tar +tar -xf archive.tar --overwrite +rm archive.tar + +git add -A + +echo "Diffs:" +git diff --cached + +git config --global user.email "travis@travis-ci.org" +git config --global user.name "Travis CI" + +git commit -m "$COMMIT" + +git push https://$GITHUB_TOKEN@${REMOTE#*//} $TARGET_BRANCH \ No newline at end of file diff --git a/Ci/show_tree.sh b/Ci/show_tree.sh new file mode 100644 index 0000000..90d633e --- /dev/null +++ b/Ci/show_tree.sh @@ -0,0 +1,11 @@ +#!/bin/bash + + +shopt -s globstar +for rdir in $1 +do + for file in $rdir/** + do + echo "$file" + done +done diff --git a/LICENSE.meta b/LICENSE.meta deleted file mode 100644 index 231b960..0000000 --- a/LICENSE.meta +++ /dev/null @@ -1,8 +0,0 @@ -fileFormatVersion: 2 -guid: 738db0bb843265d4ab76c617747a9859 -timeCreated: 1517110601 -licenseType: Free -DefaultImporter: - userData: - assetBundleName: - assetBundleVariant: diff --git a/README.md b/README.md index 3532c94..c85ba05 100644 --- a/README.md +++ b/README.md @@ -9,6 +9,18 @@ We felt the AssetBundleManager provided by Unity was complicated and out-dated.. ## Requirements - Unity 2017.1 or greater. +## Installation + +- Open file `manifest.json` in `your_repo/Packages`, +- Under `dependencies` add following line: + +```json +"asset-bundle-manager": "https://github.com/SadPandaStudios/AssetBundleManager.git#upm", +``` + +- Refresh your project in Unity, +- Don't forget to add this assembly `AssetBundleManager` to `Assembly Definition References` if you want to use this tool from your assembly. + ## Recommendations This module pairs well with Unity's [Asset Bundle Browser](https://github.com/Unity-Technologies/AssetBundles-Browser) (ABB) tool. diff --git a/README.md.meta b/README.md.meta deleted file mode 100644 index 09c7ddf..0000000 --- a/README.md.meta +++ /dev/null @@ -1,8 +0,0 @@ -fileFormatVersion: 2 -guid: 0ffdaa487498e5c4ca439a588ef42285 -timeCreated: 1517110601 -licenseType: Free -DefaultImporter: - userData: - assetBundleName: - assetBundleVariant: