-
Notifications
You must be signed in to change notification settings - Fork 0
/
Makefile
25 lines (20 loc) · 886 Bytes
/
Makefile
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
linuxtarget = linux-x64
windowstarget = win-x64
version := $(shell cat < 'Version')
.PHONY: all linux windows clean
all: linux windows
linux:
echo "$(version)-$(linuxtarget)" > VersionName
mkdir -p releases
dotnet publish src/ -c release -r $(linuxtarget) --self-contained
cp LICENSE src/bin/release/netcoreapp3.1/$(linuxtarget)/publish/
cd src/bin/release/netcoreapp3.1/$(linuxtarget)/publish/ && tar -cvzf ../../../../../../releases/CloudCopy-$(version)-$(linuxtarget).tar.gz *
windows:
echo "$(version)-$(windowstarget)" > VersionName
mkdir -p releases
dotnet publish src/ -c release -r $(windowstarget) --self-contained
cp LICENSE src/bin/release/netcoreapp3.1/$(windowstarget)/publish/
cd src/bin/release/netcoreapp3.1/$(windowstarget)/publish/ && zip ../../../../../../releases/CloudCopy-$(version)-$(windowstarget).zip *
clean:
rm -rf src/bin/
rm -rf releases/