Permalink
Browse files

Use make for build automation

  • Loading branch information...
yevhen committed Nov 12, 2017
1 parent ceb82e8 commit ea157b1ed79051b7e57ae2127da4c7ecc9c5e8ee
Showing with 40 additions and 76 deletions.
  1. +36 −0 Makefile
  2. +0 −8 Nake.bat
  3. +0 −60 Nake.csx
  4. +3 −7 README.md
  5. +1 −1 appveyor.yml
@@ -0,0 +1,36 @@
PROJECT=Streamstone
OUT_DIR=$(CURDIR)/Output
VERSION=$(shell cat $(CURDIR)/Source/Streamstone.Version.cs | grep -oP [0-9]\.[0-9]\.[0-9] | uniq)
nuget=$(CURDIR)/Tools/Nuget.exe
nunit-test-results=nunit-test-results.trx
default: package
build-debug:
@dotnet build ${PROJECT}.sln /p:Configuration=Debug
build-release:
@dotnet build ${PROJECT}.sln /p:Configuration=Release
verify:
@dotnet test Source/**/*.Tests.csproj --configuration Debug \
-l:trx\;LogFileName=${nunit-test-results} \
--results-directory ${OUT_DIR}
package: verify build-release
@${nuget} pack ${CURDIR}/Source/${PROJECT}/${PROJECT}.nuspec \
-Version ${VERSION} \
-OutputDirectory ${OUT_DIR} \
-BasePath ${CURDIR}/Source/Streamstone/bin/Release \
-NoPackageAnalysis
$(if $(filter $(APPVEYOR),True), \
@curl -XPOST --data-binary $(OUT_DIR)/$(nunit-test-results) \
https://ci.appveyor.com/api/testresults/mstest/$(APPVEYOR_JOB_ID))
publish:
@dotnet nuget push ${OUT_DIR}/${PROJECT}.${VERSION}.nupkg --api-key $(NuGetApiKey) --source https://nuget.org/
version:
@echo $(VERSION)

This file was deleted.

Oops, something went wrong.

This file was deleted.

Oops, something went wrong.
@@ -25,15 +25,11 @@ To install Streamstone via NuGet, run this command in NuGet package manager cons
## Building from source [![Build status](https://ci.appveyor.com/api/projects/status/3rsmwblor11b6inq/branch/master?svg=true)](https://ci.appveyor.com/project/yevhen/streamstone/branch/master)
Currently, automated build scripts can be run only on Windows but it's possible to produce binary on Linux by using dotnet cli tooling (ie `dotnet build`). To build Streamstone binaries on Windows you will need to have Visual Studio 17 Update 3 or higher and .NET Core SDK 2.0 or higher.
To build Streamstone binaries on Windows you will need to have Visual Studio 17 Update 3 or higher and .NET Core SDK 2.0 or higher. To build binaries on Linux use dotnet cli tooling (ie `dotnet build`).
To build Streamstone from cli on Windows, run the following command from solution's root directory:
## Running unit tests
> Nake.bat package
For a list of available commands run `Nake.bat -T`.
> NOTE: Unit tests require Azure Storage Emulator 5.2 or higher. Alternatively, you could run against real storage by setting storage account connection string to **Streamstone-Test-Storage** user-level environment variable.
Unit tests require Azure Storage Emulator 5.2 or higher, which is currently available only on Windows. Alternatively, you could run against real Azure by setting storage account connection string to **Streamstone-Test-Storage** user-level environment variable.
## Design
@@ -9,7 +9,7 @@ build_script:
- cmd: >-
"C:\Program Files (x86)\Microsoft SDKs\Azure\Storage Emulator\AzureStorageEmulator.exe" start
Nake.bat package
C:\cygwin\make.exe package
test: off
artifacts:
- path: Output\Package\*.nupkg

0 comments on commit ea157b1

Please sign in to comment.