-
Notifications
You must be signed in to change notification settings - Fork 5
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #133 from nickvdyck/chore/build
chore: redo build setup
- Loading branch information
Showing
25 changed files
with
263 additions
and
585 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
File renamed without changes.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,91 @@ | ||
.PHONY: purge clean default install uninstall setup test | ||
.DEFAULT_GOAL := default | ||
|
||
ARTIFACTS := $(shell pwd)/artifacts | ||
BUILD := $(shell pwd)/.build | ||
TEMP := $(shell pwd)/.tmp | ||
CONFIGURATION := Release | ||
WEBTTY_EXEC := src/WebTty.Exec/WebTty.Exec.csproj | ||
WEBTTY_CLIENT := src/WebTty.Hosting/Client | ||
CLI_PROJECT := src/WebTty/WebTty.csproj | ||
CLI_TOOL := webtty | ||
RUNTIME := linux-x64 | ||
|
||
purge: | ||
rm -rf $(BUILD) | ||
rm -rf $(ARTIFACTS) | ||
rm -rf $(TEMP) | ||
|
||
clean: | ||
rm -rf $(ARTIFACTS) | ||
dotnet clean | ||
|
||
restore: | ||
dotnet restore | ||
dotnet tool restore | ||
|
||
setup: restore | ||
dotnet run --project tools/jsonschema/jsonschema.csproj | ||
dotnet build -c $(CONFIGURATION) | ||
|
||
default: | ||
$(MAKE) package | ||
|
||
package: restore package-exec | ||
dotnet restore --force-evaluate | ||
dotnet build -c $(CONFIGURATION) /property:IsPackaging=True $(CLI_PROJECT) | ||
dotnet pack $(CLI_PROJECT) --configuration $(CONFIGURATION) \ | ||
--no-build \ | ||
--output $(ARTIFACTS) \ | ||
--include-symbols | ||
|
||
package-exec: | ||
dotnet pack $(WEBTTY_EXEC) \ | ||
--configuration $(CONFIGURATION) \ | ||
--output $(ARTIFACTS) \ | ||
--version-suffix build.$(shell date "+%Y%m%d%H%M%S") | ||
|
||
package-native: | ||
dotnet publish $(CLI_PROJECT) -c $(CONFIGURATION) \ | ||
--output $(BUILD)/publish/$(RUNTIME) \ | ||
--runtime $(RUNTIME) \ | ||
/property:PublishTrimmed=true \ | ||
/property:PublishSingleFile=true | ||
|
||
@mkdir -p $(ARTIFACTS) | ||
@cp $(BUILD)/publish/$(RUNTIME)/$(CLI_TOOL) $(ARTIFACTS)/$(CLI_TOOL).$(RUNTIME) | ||
|
||
package-osx: | ||
$(MAKE) package-native RUNTIME=osx-x64 | ||
|
||
install: | ||
dotnet tool install --global --add-source $(ARTIFACTS) \ | ||
--version $$(dotnet minver -t v -a minor -v e) \ | ||
$(CLI_TOOL) | ||
|
||
uninstall: | ||
dotnet tool uninstall --global $(CLI_TOOL) | ||
|
||
lint: types | ||
yarn --cwd $(WEBTTY_CLIENT) lint | ||
|
||
types: | ||
yarn --cwd $(WEBTTY_CLIENT) tsc --noEmit | ||
|
||
test: | ||
yarn --cwd $(WEBTTY_CLIENT) test --coverage --coverageDirectory $(TEMP)/webtty.hosting/client | ||
|
||
dotnet test test/WebTty.Test/WebTty.Test.csproj -c Release \ | ||
/property:CollectCoverage=true \ | ||
/property:CoverletOutputFormat=lcov \ | ||
/property:CoverletOutput=$(TEMP)/webtty.test/lcov.info | ||
|
||
dotnet test test/WebTty.Api.Test/WebTty.Api.Test.csproj -c Release \ | ||
/property:CollectCoverage=true \ | ||
/property:CoverletOutputFormat=lcov \ | ||
/property:CoverletOutput=$(TEMP)/webtty.api.test/lcov.info | ||
|
||
dotnet test test/WebTty.Integration.Test/WebTty.Integration.Test.csproj -c Release \ | ||
/property:CollectCoverage=true \ | ||
/property:CoverletOutputFormat=lcov \ | ||
/property:CoverletOutput=$(TEMP)/webtty.integration.test/lcov.info |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,13 +1,16 @@ | ||
<Project> | ||
|
||
<Import Project="Version.props" /> | ||
<Import Project="../../BuildOutput.props" /> | ||
<Import Project="../../Common.props" /> | ||
|
||
<PropertyGroup> | ||
<LangVersion>latest</LangVersion> | ||
<RootNamespace>WebTty.Exec</RootNamespace> | ||
<EnableDefaultCompileItems>false</EnableDefaultCompileItems> | ||
<AssemblyName>WebTty.Exec</AssemblyName> | ||
|
||
<VersionPrefix>1.0.0</VersionPrefix> | ||
<PackageVersion>$(VersionPrefix)</PackageVersion> | ||
<PackageVersion Condition="'$(VersionSuffix)' != ''">$(PackageVersion)-$(VersionSuffix)</PackageVersion> | ||
</PropertyGroup> | ||
|
||
</Project> |
This file was deleted.
Oops, something went wrong.
Oops, something went wrong.