-
Notifications
You must be signed in to change notification settings - Fork 0
/
Makefile
31 lines (25 loc) · 1.28 KB
/
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
26
27
28
29
30
31
FRAMEWORK ?= net5.0
CONFIGURATION ?= Debug
run:
dotnet run --project src/PokepayPartnerCsharpSdk.Example/PokepayPartnerCsharpSdk.Example.csproj --framework ${FRAMEWORK}
build:
dotnet build src/PokepayPartnerCsharpSdk/PokepayPartnerCsharpSdk.csproj --configuration ${CONFIGURATION} --framework ${FRAMEWORK}
test:
dotnet test -v normal src/PokepayPartnerCsharpSdk.Test/PokepayPartnerCsharpSdk.Test.csproj --framework ${FRAMEWORK}
check-publish-env:
ifndef RELEASE_VERSION
$(error RELEASE_VERSION is mandatory. eg: RELEASE_VERSION=1.2.3)
endif
ifndef API_KEY
$(error API_KEY is mandatory. eg: API_KEY=xxxxxxyyyyyyyyyzzzzzz)
endif
publish: check-publish-env build
CONFIGURATION=Release FRAMEWORK=net48 make build
CONFIGURATION=Release FRAMEWORK=net5.0 make build
dotnet pack --configuration Release src/PokepayPartnerCsharpSdk/PokepayPartnerCsharpSdk.csproj
dotnet nuget push src/PokepayPartnerCsharpSdk/bin/Release/pokepay-partner-csharp-sdk.$(RELEASE_VERSION).nupkg --api-key $(API_KEY) --source https://api.nuget.org/v3/index.json
clean:
dotnet clean src/PokepayPartnerCsharpSdk/PokepayPartnerCsharpSdk.csproj
dotnet clean src/PokepayPartnerCsharpSdk/PokepayPartnerCsharpSdk.Test.csproj
dotnet clean src/PokepayPartnerCsharpSdk.Example/PokepayPartnerCsharpSdk.Example.csproj
.PHONY: clean publish