File tree 2 files changed +43
-18
lines changed
2 files changed +43
-18
lines changed Original file line number Diff line number Diff line change
1
+ .DEFAULT_GOAL := debug
2
+
3
+ DOTNET = dotnet
4
+ RUNTIME = linux-x64
5
+ TARGET = netcoreapp2.2
6
+ PACKER = ../Tools/linux-x64.warp-packer
7
+ EXEC_NAME = AttackSurfaceAnalyzerCli
8
+ PUBLISH_DIR = bin/Release/$(TARGET ) /$(RUNTIME ) /publish/
9
+ NBGV_DIR = ../Tools
10
+ VERSION := $(shell $(NBGV_DIR ) /nbgv get-version -v AssemblyInformationalVersion)
11
+ FULL_EXEC_PATH = bin/$(EXEC_NAME ) -linux-$(VERSION )
12
+
13
+ prerequisites :
14
+ $(info Checking for nbgv, installing if required.)
15
+ @which $(NBGV_DIR ) /nbgv || dotnet tool install --tool-path $(NBGV_DIR ) / nbgv
16
+
17
+ all : prerequisites debug
18
+ debug : prerequisites clean restore build_debug
19
+ release : prerequisites clean restore build_release
20
+
21
+ clean :
22
+ $(info Cleaning...)
23
+ dotnet clean
24
+
25
+ restore :
26
+ $(info Restoring...)
27
+ dotnet restore
28
+
29
+ build_debug :
30
+ $(info Building debug...)
31
+ dotnet build
32
+ $(info Debug build completed.)
33
+
34
+ build_release :
35
+ $(info Building release...)
36
+ dotnet build
37
+ $(info Detected version as $(VERSION ) )
38
+
39
+ $(DOTNET) publish -c Release -r $(RUNTIME) --self-contained true
40
+ $(PACKER) --arch $(RUNTIME) --input_dir $(PUBLISH_DIR) --exec $(EXEC_NAME) --output $(FULL_EXEC_PATH)
41
+ chmod +x $(FULL_EXEC_PATH)
42
+ $(info Release build completed, result is located at $(FULL_EXEC_PATH))
Original file line number Diff line number Diff line change 1
1
#! /bin/bash
2
2
3
- RELEASE=" Debug"
4
- while [ " $1 " != " " ]; do
5
- case " $1 " in
6
- -r | --release )
7
- shift
8
- RELEASE=" $1 "
9
- esac
10
- shift
11
- done
12
-
13
- if [ " $RELEASE " == " Debug" ]; then
14
- dotnet build
15
- elif [ " $RELEASE " == " Release" ]; then
16
- VERSION=$( nbgv get-version -v AssemblyInformationalVersion)
17
- dotnet publish -c " $RELEASE " -r linux-x64 --self-contained true && ../Tools/linux-x64.warp-packer --arch linux-x64 --input_dir bin/Release/netcoreapp2.1/linux-x64/publish/ --exec AttackSurfaceAnalyzerCli --output bin/AttackSurfaceAnalyzerCli-linux-$VERSION .bin
18
- chmod +x AttackSurfaceAnalyzerCli
19
- echo " Build completed, result is located at bin/AttackSurfaceAnalyzerCli-linux-$VERSION .bin"
20
- fi
3
+ make
You can’t perform that action at this time.
0 commit comments