Skip to content

Commit

Permalink
Add Makefile
Browse files Browse the repository at this point in the history
  • Loading branch information
VeyronSakai committed May 23, 2024
1 parent 16a96ac commit 2f207ed
Show file tree
Hide file tree
Showing 4 changed files with 18 additions and 2 deletions.
16 changes: 16 additions & 0 deletions Makefile
Original file line number Diff line number Diff line change
@@ -0,0 +1,16 @@
.PHONY: help
help: ## Display this help screen
@grep -E '^[a-zA-Z_-]+:.*?## .*$$' $(MAKEFILE_LIST) | awk 'BEGIN {FS = ":.*?## "}; {printf "\033[36m%-20s\033[0m %s\n", $$1, $$2}'

.PHONY: all
all: build copy ## Build and Copy

.PHONY: build
build: ## Build csproj
rm -rf output
dotnet build --no-incremental RoslynAnalyzerTemplate/RoslynAnalyzerTemplate.csproj --output output --configuration Release

.PHONY: copy
copy: ## Copy dll file to Unity Project
rm -f RoslynAnalyzerTemplate.Unity/Assets/Plugins/RoslynAnalyzerTemplate/RoslynAnalyzerTemplate.dll*
cp output/RoslynAnalyzerTemplate.dll RoslynAnalyzerTemplate.Unity/Assets/Plugins/RoslynAnalyzerTemplate/RoslynAnalyzerTemplate.dll
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@ private void OnPreprocessAsset()
}

var importer = AssetImporter.GetAtPath(assetPath) as PluginImporter;
if (!importer)
if (importer == null)
{
return;
}
Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
{
"name": "RoslynAnalyzerTemplate",
"name": "DefaultAssembly",
"rootNamespace": "",
"references": [],
"includePlatforms": [
Expand Down
Binary file not shown.

0 comments on commit 2f207ed

Please sign in to comment.