-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathMakefile
More file actions
48 lines (35 loc) · 1.3 KB
/
Makefile
File metadata and controls
48 lines (35 loc) · 1.3 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
export FrameworkPathOverride=$(shell dirname $(shell which mono))/../lib/mono/4.5/
SONAR_VERSION=$(shell xmllint --xpath 'string(/Project/ItemGroup/PackageReference[@Include="SonarAnalyzer.VisualBasic"]/@Version)' src/Analyzer/Analyzer.csproj | tr -d '\n')
BUILD_CMD=dotnet build --no-restore /property:GenerateFullPaths=true
LIBRARIES_FOLDER=.lib
PACKAGES_FOLDER=.packages
RESOURCE_FOLDER=.res
all: configure build
configure:
dotnet restore
build-all:
$(BUILD_CMD)
build: src/Analyzer
build:
$(BUILD_CMD) $^
build-seed:
$(BUILD_CMD) src/Seed
build-docs:
$(BUILD_CMD) src/DocsGenerator
update-docs:
curl -L "https://github.com/SonarSource/sonar-dotnet/releases/download/$(SONAR_VERSION)/sonar-vbnet-plugin-$(SONAR_VERSION).jar" \
-o sonar-vbnet-plugin.jar
mkdir -p $(RESOURCE_FOLDER)
unzip sonar-vbnet-plugin.jar -d '$(RESOURCE_FOLDER)/sonar-vbnet-plugin'
cp $(RESOURCE_FOLDER)/sonar-vbnet-plugin/org/sonar/plugins/vbnet/rules.xml "$(RESOURCE_FOLDER)/sonar-vbnet-rules.xml"
rm sonar-vbnet-plugin.jar
rm -rf $(RESOURCE_FOLDER)/sonar-vbnet-plugin/
documentation: update-docs build-docs
documentation:
echo $(SONAR_VERSION) > .SONAR_VERSION
mono src/DocsGenerator/bin/Debug/net461/DocsGenerator.exe
rm .SONAR_VERSION
publish:
dotnet publish -c Release -f net461
clean:
rm -rf .lib/ .packages/ .res/