diff --git a/.github_changelog_generator b/.github_changelog_generator
new file mode 100644
index 0000000..c777f85
--- /dev/null
+++ b/.github_changelog_generator
@@ -0,0 +1,14 @@
+user=nanoframework
+project=lib-Windows.Devices.Spi
+issues=true
+add_issues_wo_labels=false
+add_pr_wo_labels=false
+add_issues_wo_labels=false
+filter_issues_by_milestone=false
+exclude_labels=Area: Config-and-Build,Area: Infrastructure-and-Organization,reverted
+enhancement_labels=Type: enhancement
+bug_labels=Type: bug
+merge_prefix=**Documentation and other chores:**
+unreleased_label=**Changes available only in 'Preview' NuGet packages:**
+issue_line_labels=Breaking-Change,documentation
+author=false
diff --git a/CHANGELOG.md b/CHANGELOG.md
new file mode 100644
index 0000000..c7e354d
--- /dev/null
+++ b/CHANGELOG.md
@@ -0,0 +1,21 @@
+# Change Log
+
+## [**Changes available only in 'Preview' NuGet packages:**](https://github.com/nanoframework/lib-Windows.Devices.Spi/tree/HEAD)
+
+**Implemented enhancements:**
+
+- Update snk to match mscorlib [\#12](https://github.com/nanoframework/lib-Windows.Devices.Spi/pull/12)
+- Update project [\#1](https://github.com/nanoframework/lib-Windows.Devices.Spi/pull/1)
+
+**Documentation and other chores:**
+
+- Bumps nanoFramework.CoreLibrary from 1.0.1-preview127 to 1.0.1-preview134 [\#19](https://github.com/nanoframework/lib-Windows.Devices.Spi/pull/19)
+- Bumps nanoFramework.CoreLibrary from 1.0.1-preview123 to 1.0.1-preview127 [\#18](https://github.com/nanoframework/lib-Windows.Devices.Spi/pull/18)
+- Bumps nanoFramework.CoreLibrary from 1.0.1-preview118 to 1.0.1-preview123 [\#17](https://github.com/nanoframework/lib-Windows.Devices.Spi/pull/17)
+- 📦 Bumps nanoFramework.CoreLibrary from 1.0.1-preview106 to 1.0.1-preview118 [\#16](https://github.com/nanoframework/lib-Windows.Devices.Spi/pull/16)
+- Bump nanoFramework.CoreLibrary from 1.0.0-preview062 to 1.0.0-preview073 in /source [\#11](https://github.com/nanoframework/lib-Windows.Devices.Spi/pull/11)
+- Update mscorlib Nuget package [\#3](https://github.com/nanoframework/lib-Windows.Devices.Spi/pull/3)
+
+
+
+\* *This Change Log was automatically generated by [github_changelog_generator](https://github.com/skywinder/Github-Changelog-Generator)*
\ No newline at end of file
diff --git a/GitVersion.yml b/GitVersion.yml
new file mode 100644
index 0000000..a9712f5
--- /dev/null
+++ b/GitVersion.yml
@@ -0,0 +1,38 @@
+next-version: 1.0.0
+assembly-versioning-scheme: MajorMinorPatch
+assembly-file-versioning-scheme: MajorMinorPatch
+assembly-informational-format: '{LegacySemVerPadded}'
+build-metadata-padding: 3
+legacy-semver-padding: 3
+major-version-bump-message: '\+semver:\s?(breaking|major)'
+minor-version-bump-message: '\+semver:\s?(feature|minor)'
+patch-version-bump-message: '\+semver:\s?(fix|patch)'
+branches:
+ master:
+ mode: ContinuousDelivery
+ tag:
+ increment: Patch
+ prevent-increment-of-merged-branch-version: true
+ track-merge-target: false
+ develop:
+ regex: dev(elop)?(ment)?$
+ mode: ContinuousDeployment
+ tag: preview
+ increment: Patch
+ prevent-increment-of-merged-branch-version: false
+ track-merge-target: true
+ tracks-release-branches: true
+ is-release-branch: false
+ release:
+ tag: rc
+ pull-request:
+ regex: (pull|pull\-requests|pr)[/-]
+ tag: alpha
+ mode: ContinuousDelivery
+ increment: Inherit
+ prevent-increment-of-merged-branch-version: false
+ track-merge-target: false
+ tracks-release-branches: false
+ is-release-branch: false
+ignore:
+ sha: []
diff --git a/README.md b/README.md
index 965c480..6d4e3e0 100644
--- a/README.md
+++ b/README.md
@@ -1,3 +1,6 @@
+[![License](https://img.shields.io/badge/License-Apache%202.0-blue.svg)](https://github.com/nanoframework/Home/blob/master/LICENSE) [![NuGet](https://img.shields.io/nuget/dt/nanoFramework.Windows.Devices.Spi.svg)]() [![#yourfirstpr](https://img.shields.io/badge/first--timers--only-friendly-blue.svg)](https://github.com/nanoframework/Home/blob/master/CONTRIBUTING.md) [![Discord](https://img.shields.io/discord/478725473862549535.svg)](https://discord.gg/gCyBu8T)
+
+
![nanoFramework logo](https://github.com/nanoframework/Home/blob/master/resources/logo/nanoFramework-repo-logo.png)
-----
@@ -7,16 +10,18 @@
## Build status
+
| Component | Build Status | NuGet Package |
|:-|---|---|
-| Class Libraries | [![Build status](https://ci.appveyor.com/api/projects/status/terbqvfdlw8po3cm?svg=true)](https://ci.appveyor.com/project/nfbot/nf-class-libraries) | [![NuGet](https://img.shields.io/nuget/dt/nanoFramework.Windows.Devices.Spi.svg)]() |
+| Windows.Devices.Spi | [![Build status](https://ci.appveyor.com/api/projects/status/6v5nkr5iyv3i35uw/branch/master?svg=true)](https://ci.appveyor.com/project/nfbot/lib-windows-devices-spi/branch/master) | [![NuGet](https://img.shields.io/nuget/vpre/nanoFramework.Windows.Devices.Spi.svg)](https://www.nuget.org/packages/nanoFramework.Windows.Devices.Spi/) |
+| Windows.Devices.Spi (preview) | [![Build status](https://ci.appveyor.com/api/projects/status/6v5nkr5iyv3i35uw/branch/develop?svg=true)](https://ci.appveyor.com/project/nfbot/lib-windows-devices-spi/branch/develop) | [![MyGet Pre Release](https://img.shields.io/myget/nanoframework-dev/vpre/nanoFramework.Windows.Devices.Spi.svg)](https://www.myget.org/feed/nanoframework-dev/package/nuget/nanoFramework.Windows.Devices.Spi) |
## Feedback and documentation
For documentation, providing feedback, issues and finding out how to contribute please refer to the [Home repo](https://github.com/nanoframework/Home).
-Join our Slack community by filling in this [invite form](https://nanoframework.wordpress.com/slack-invite-form/).
+Join our Discord community [here](https://discord.gg/gCyBu8T).
## Credits
diff --git a/appveyor-discord.ps1 b/appveyor-discord.ps1
new file mode 100644
index 0000000..a1ce8b9
--- /dev/null
+++ b/appveyor-discord.ps1
@@ -0,0 +1,82 @@
+# Copyright (c) 2017 The nanoFramework project contributors
+# Portions Copyright (c) Sankarsan Kampa (a.k.a. k3rn31p4nic). All rights reserved.
+# See LICENSE file in the project root for full license information.
+
+$STATUS=$args[0]
+$WEBHOOK_URL=$args[1]
+
+Write-Output "[Webhook]: Sending webhook to Discord..."
+
+Switch ($STATUS) {
+ "success" {
+ $EMBED_COLOR=3066993
+ $STATUS_MESSAGE="Passed"
+ Break
+ }
+ "failure" {
+ $EMBED_COLOR=15158332
+ $STATUS_MESSAGE="Failed"
+ Break
+ }
+ default {
+ Write-Output "Default!"
+ Break
+ }
+}
+
+if (!$env:APPVEYOR_REPO_COMMIT) {
+ $env:APPVEYOR_REPO_COMMIT="$(git log -1 --pretty="%H")"
+}
+
+$AUTHOR_NAME="$(git log -1 "$env:APPVEYOR_REPO_COMMIT" --pretty="%aN")"
+$COMMITTER_NAME="$(git log -1 "$env:APPVEYOR_REPO_COMMIT" --pretty="%cN")"
+$COMMIT_SUBJECT="$(git log -1 "$env:APPVEYOR_REPO_COMMIT" --pretty="%s")"
+$COMMIT_MESSAGE="$(git log -1 "$env:APPVEYOR_REPO_COMMIT" --pretty="%b")"
+
+if ($AUTHOR_NAME -eq $COMMITTER_NAME) {
+ $CREDITS = "$AUTHOR_NAME authored & committed"
+}
+else {
+ $CREDITS = "$AUTHOR_NAME authored & $COMMITTER_NAME committed"
+}
+
+if ($env:APPVEYOR_PULL_REQUEST_NUMBER) {
+ $URL="https://github.com/$env:APPVEYOR_REPO_NAME/pull/$env:APPVEYOR_PULL_REQUEST_NUMBER"
+}
+else {
+ $URL=""
+}
+
+$BUILD_VERSION = [uri]::EscapeDataString($env:APPVEYOR_BUILD_VERSION)
+
+$WEBHOOK_DATA="{
+ ""embeds"": [ {
+ ""color"": $EMBED_COLOR,
+ ""author"": {
+ ""name"": ""Job #$env:APPVEYOR_JOB_NUMBER (Build #$env:APPVEYOR_BUILD_NUMBER) $STATUS_MESSAGE - $env:APPVEYOR_REPO_NAME"",
+ ""url"": ""https://ci.appveyor.com/project/$env:APPVEYOR_ACCOUNT_NAME/$env:APPVEYOR_PROJECT_SLUG/build/$BUILD_VERSION"",
+ ""icon_url"": ""$AVATAR""
+ },
+ ""title"": ""$COMMIT_SUBJECT"",
+ ""url"": ""$URL"",
+ ""description"": ""$COMMIT_MESSAGE $CREDITS"",
+ ""fields"": [
+ {
+ ""name"": ""Commit"",
+ ""value"": ""[``$($env:APPVEYOR_REPO_COMMIT.substring(0, 7))``](https://github.com/$env:APPVEYOR_REPO_NAME/commit/$env:APPVEYOR_REPO_COMMIT)"",
+ ""inline"": true
+ },
+ {
+ ""name"": ""Branch/Tag"",
+ ""value"": ""[``$env:APPVEYOR_REPO_BRANCH``](https://github.com/$env:APPVEYOR_REPO_NAME/tree/$env:APPVEYOR_REPO_BRANCH)"",
+ ""inline"": true
+ }
+ ]
+ } ],
+ ""content"" : """",
+ ""file"": """"
+}"
+
+Invoke-RestMethod -Uri $WEBHOOK_URL -Method POST -UserAgent AppVeyor-Webhook -ContentType 'application/json' -Body $WEBHOOK_DATA
+
+Write-Output "[Webhook]: Successfully sent the webhook."
diff --git a/appveyor.yml b/appveyor.yml
index 9d1d37d..5cc16c9 100644
--- a/appveyor.yml
+++ b/appveyor.yml
@@ -1,30 +1,164 @@
-version: 1.0.{build}
+# configuration for all branches
+
+image: Visual Studio 2017
+
+skip_tags: false
+
+skip_branch_with_pr: true
+
+test: off
+
pull_requests:
do_not_increment_build_number: true
-image: Visual Studio 2017
-clone_depth: 1
+
+# Skipping commits affecting specific files
+skip_commits:
+ files:
+ - '**\AssemblyInfo*.*'
+ - '**/*.md'
+ - 'LICENSE'
+ - dir/*
+ - '.gitignore'
+
+build:
+ verbosity: minimal
+
+environment:
+ APPVEYOR_SAVE_CACHE_ON_ERROR: true
+ matrix:
+ - RUBY_VERSION: 24
+ GitHubUserName:
+ secure: 7OBtVAMTodMWK20wg6pGnQ==
+ GitHubUserEmail:
+ secure: /NpmL1KqwHyHFnF0GlUovA586wDIt8Hg/Q8Dro6kUpk=
+ GitHubToken:
+ secure: i/2hGsqVMwzdM5yIS4rxOIeG3ftx7su7klWYN80s/fHvgk7A5H2fF3oUTNLcyTbw
+ GitRestAuth:
+ secure: E3bCMe4LtDdAhHSYRcLp0N6DixJe1m8TNxhYeJW/GnqM3WXdRqsgkHSbwootPjJQtOQJrps4twmzTVzofLSVgPgbzU8PxU0AkJV7zwkyVOE=
+
+init:
+- git config --global core.autocrlf true
+- git config --global credential.helper store
+- ps: Add-Content "$env:USERPROFILE\.git-credentials" "https://$($env:GitHubToken):x-oauth-basic@github.com`n"
+- git config --global user.email "%GitHubUserEmail%"
+- git config --global user.name "%GitHubUserName%"
+- ps: "$headers = if($env:APPVEYOR_PULL_REQUEST_NUMBER){\n @{\n \"Authorization\" = \"Basic $env:GitRestAuth\"\n \"Content-type\" = \"application/json\"\n}\n\n$pr = Invoke-RestMethod -Uri \"https://api.github.com/repos/$env:APPVEYOR_REPO_NAME/pulls/$env:APPVEYOR_PULL_REQUEST_NUMBER\" -Headers $headers -Method GET\n\nif($pr.user.login -eq \"nfbot\" -and $pr.body -match \"*[version update]*\")\n{\n # commit was from nfbot AND it's taged as a [version update]\n # OK to skip AppVeyor build \n \"Version update only. Skipping build.\" | Write-Host -BackgroundColor White -ForegroundColor Blue\n Exit-AppveyorBuild\n} }\n"
+- ps: "if($env:APPVEYOR_PULL_REQUEST_NUMBER -eq \"\")\n{\n \n if($env:APPVEYOR_REPO_COMMIT_AUTHOR -eq \"nfbot\" -and $env:APPVEYOR_REPO_COMMIT_MESSAGE_EXTENDED -like \"*[version update]*\")\n {\n # commit was from nfbot AND it's taged as a [version update]\n # OK to skip AppVeyor build \n \"Version update only. Skipping build.\" | Write-Host -BackgroundColor White -ForegroundColor Blue\n Exit-AppveyorBuild\n }\n}"
+
install:
-- ps: .\install-vsix-appveyor.ps1
-build_script:
+ - set PATH=C:\Ruby%RUBY_VERSION%\bin;%PATH%
+ - bundle config --local path vendor/bundle
+ - gem install bundler --quiet --no-ri --no-rdoc
+ - gem install github_changelog_generator --quiet --no-ri --no-rdoc
+ - choco install gitversion.portable -pre -y
+ - ps: .\install-vsix-appveyor.ps1
+
+before_build:
- ps: >-
+ nuget sources add -name MyGet -Source https://www.myget.org/F/nanoframework-dev
+
nuget restore source\nanoFramework.Windows.Devices.Spi.sln
- msbuild source\nanoFramework.Windows.Devices.Spi.sln /p:Configuration=Release /logger:"C:\Program Files\AppVeyor\BuildAgent\Appveyor.MSBuildLogger.dll"
-
-artifacts:
-- path: '**\bin\Release\*.nupkg'
- name: Nuget Packages
-deploy:
-- provider: NuGet
- api_key:
- secure: NSRDXbS8tmzOy4wStGuO3yQMKI8Sk10vF8iQtz9ZDXEnHfwnuDdnXbr/Kno3MMvY
- skip_symbols: true
-notifications:
-- provider: Slack
- auth_token:
- secure: 2tqAJTTbN2dm24Vrwo5TXun3Vxc34R5G9l7o3pK3xEuKZAzxx3nbP2yGkMI/kl3+NxHXknjBfZnkhZC5eLYBHb+jO7YVUZwPYOfC/ZGy5HU=
- channel: '#build-monitor'
- on_build_status_changed: true
- on_build_success: false
- on_build_failure: false
+ C:\ProgramData\chocolatey\lib\GitVersion.Portable\tools\GitVersion.exe /l console /output buildserver /updateAssemblyInfo "source\nanoFramework.Windows.Devices.Spi\Properties\AssemblyInfo.cs"
+
+build_script:
+- ps: >-
+
+ msbuild source\nanoFramework.Windows.Devices.Spi.sln /p:Configuration=Release /logger:"C:\Program Files\AppVeyor\BuildAgent\Appveyor.MSBuildLogger.dll"
+
+before_deploy:
+ - ps: >-
+ .\commit-assemblyinfo-changes.ps1
+
+ .\generate-change-log.ps1
+
+ Push-AppveyorArtifact $env:APPVEYOR_BUILD_FOLDER\source\Nuget.Windows.Devices.Spi\bin\Release\nanoFramework.Windows.Devices.Spi.$env:GitVersion_NuGetVersionV2.nupkg
+
+after_deploy:
+# for this environment variable to work here it has to be set in AppVeyor UI
+- nuget push source\Nuget.Windows.Devices.Spi\bin\Release\nanoFramework.Windows.Devices.Spi.%GitVersion_NuGetVersionV2%.nupkg %MyGetToken% -Source https://www.myget.org/F/nanoframework-dev/api/v2/package
+- nuget push source\Nuget.Windows.Devices.Spi.DELIVERABLES\bin\Release\nanoFramework.Windows.Devices.Spi.DELIVERABLES.%GitVersion_NuGetVersionV2%.nupkg %MyGetToken% -Source https://www.myget.org/F/nanoframework-dev/api/v2/package
+
+# requires APPVEYOR_DISCORD_WEBHOOK_URL enviroment variable set with Discord webhook URL
+on_failure:
+ - ps: |
+
+ & $env:APPVEYOR_BUILD_FOLDER\appveyor-discord.ps1 failure $env:APPVEYOR_DISCORD_WEBHOOK_URL
+
+cache:
+ - source\packages -> **source\packages.config
+ - C:\ProgramData\chocolatey\bin -> appveyor.yml
+ - C:\ProgramData\chocolatey\lib -> appveyor.yml
+
+################################################
+# override configuration for specific branches
+for:
+
+-
+ branches:
+ only:
+ - master
+ - /v.*/
+
+ deploy:
+ - provider: NuGet
+ api_key: $(NuGetToken)
+ skip_symbols: true
+ on:
+ appveyor_repo_tag: true
+ - provider: GitHub
+ tag: v$(GitVersion_NuGetVersionV2)
+ release: nanoFramework Windows.Devices.Spi Library v$(gitversion_semver)
+ description: 'Check the [changelog](https://github.com/nanoframework/lib-nanoFramework.Windows.Devices.Spi/blob/master/CHANGELOG.md)\n\n## Install from NuGet\n\nThe following NuGet packages are available for download from this release\n\n:package: [.NET](https://www.nuget.org/packages/nanoFramework.Windows.Devices.Spi/$(GitVersion_NuGetVersionV2)) v$(GitVersion_NuGetVersionV2)'
+ auth_token:
+ secure: DNixoFFE+pGlwyhj7McfZoln42vOmj0iY1iNV9zXEr3y0NpXlOIgL8k5ehzlFM1S
+ artifact:
+ draft: true
+ prerelease: false
+ force_update: true
+ on:
+ appveyor_repo_tag: false
+
+-
+ branches:
+ only:
+ - /dev.*/
+
+ deploy:
+ - provider: GitHub
+ tag: v$(GitVersion_NuGetVersionV2)
+ release: nanoFramework Windows.Devices.Spi Library v$(gitversion_semver)
+ description: 'Check the [changelog](https://github.com/nanoframework/lib-nanoFramework.Windows.Devices.Spi/blob/$(appveyor_repo_branch)/CHANGELOG.md)\n\n## Install from nanoFramework MyGet development feed\n\nThe following NuGet packages are available for download from this release\n\npackage: [.NET](https://www.myget.org/feed/nanoframework-dev/package/nuget/nanoFramework.Windows.Devices.Spi/$(GitVersion_NuGetVersionV2)) v$(GitVersion_NuGetVersionV2)'
+ auth_token:
+ secure: DNixoFFE+pGlwyhj7McfZoln42vOmj0iY1iNV9zXEr3y0NpXlOIgL8k5ehzlFM1S
+ artifact:
+ draft: true
+ prerelease: true
+ force_update: true
+ on:
+ appveyor_repo_tag: false
+
+-
+ branches:
+ only:
+ - /release.*/
+
+ deploy:
+ - provider: NuGet
+ api_key: $(NuGetToken)
+ skip_symbols: true
+ on:
+ appveyor_repo_tag: true
+ - provider: GitHub
+ tag: v$(GitVersion_NuGetVersionV2)
+ release: nanoFramework Windows.Devices.Spi Library v$(gitversion_semver)
+ description: 'Check the [changelog](https://github.com/nanoframework/lib-nanoFramework.Windows.Devices.Spi/blob/$(appveyor_repo_branch)/CHANGELOG.md)\n\n## Install from NuGet\n\nThe following NuGet packages are available for download from this release\n\n:package: [.NET](https://www.nuget.org/packages/nanoFramework.Windows.Devices.Spi/$(GitVersion_NuGetVersionV2)) v$(GitVersion_NuGetVersionV2)'
+ auth_token:
+ secure: DNixoFFE+pGlwyhj7McfZoln42vOmj0iY1iNV9zXEr3y0NpXlOIgL8k5ehzlFM1S
+ artifact:
+ draft: true
+ prerelease: true
+ force_update: true
+ on:
+ appveyor_repo_tag: false
diff --git a/commit-assemblyinfo-changes.ps1 b/commit-assemblyinfo-changes.ps1
new file mode 100644
index 0000000..58f8b58
--- /dev/null
+++ b/commit-assemblyinfo-changes.ps1
@@ -0,0 +1,91 @@
+# skip updating assembly info changes if build is a pull-request or not a tag (master OR release)
+if ($env:appveyor_pull_request_number -or
+ ($env:APPVEYOR_REPO_BRANCH -eq "master" -and $env:APPVEYOR_REPO_TAG -eq 'true') -or
+ ($env:APPVEYOR_REPO_BRANCH -match "^release*" -and $env:APPVEYOR_REPO_TAG -eq 'true') -or
+ $env:APPVEYOR_REPO_TAG -eq "true")
+{
+ 'Skip committing assembly info changes...' | Write-Host -ForegroundColor White
+}
+else
+{
+ # updated assembly info files
+ git add "source\Windows.Devices.Spi\Properties\AssemblyInfo.cs"
+ git commit -m "Update assembly info file for v$env:GitVersion_NuGetVersionV2 [skip ci]" -m"[version update]"
+ git push origin --porcelain -q > $null
+
+ 'Updated assembly info...' | Write-Host -ForegroundColor White -NoNewline
+ 'OK' | Write-Host -ForegroundColor Green
+}
+
+# update assembly info in nf-interpreter if we are in development branch or if this is tag (master OR release)
+if ($env:APPVEYOR_REPO_BRANCH -match "^dev*" -or $env:APPVEYOR_REPO_TAG -eq "true")
+{
+ 'Updating assembly version in nf-interpreter...' | Write-Host -ForegroundColor White -NoNewline
+
+ # clone nf-interpreter repo (only a shallow clone with last commit)
+ git clone https://github.com/nanoframework/nf-interpreter -b develop --depth 1 -q
+ cd nf-interpreter
+
+ # new branch name
+ $newBranch = "$env:APPVEYOR_REPO_BRANCH-nfbot/update-version/Windows.Devices.Spi/$env:GitVersion_NuGetVersionV2"
+
+ # create branch to perform updates
+ git checkout -b "$newBranch" develop -q
+
+ # replace version in assembly declaration
+ $newVersion = $env:GitVersion_AssemblySemFileVer -replace "\." , ", "
+ $newVersion = "{ $newVersion }"
+
+ $versionRegex = "\{\s*\d+\,\s*\d+\,\s*\d+\,\s*\d+\s*}"
+ $assemblyFiles = (Get-ChildItem -Path ".\*" -Include "win_dev_spi_native.cpp" -Recurse)
+
+ foreach($file in $assemblyFiles)
+ {
+ $filecontent = Get-Content($file)
+ attrib $file -r
+ $filecontent -replace $versionRegex, $newVersion | Out-File $file -Encoding utf8
+ }
+
+ # check if anything was changed
+ $repoStatus = "$(git status --short --porcelain)"
+
+ if ($repoStatus -eq "")
+ {
+ # nothing changed
+ cd ..
+ }
+ else
+ {
+ $commitMessage = "Update Windows.Devices.Spi version to $env:GitVersion_NuGetVersionV2"
+
+ # commit changes
+ git add -A 2>&1
+ git commit -m"$commitMessage [skip ci]" -m"[version update]" -q
+ git push --set-upstream origin "$newBranch" --porcelain -q > $null
+
+ # start PR
+ $prRequestBody = @{title="$commitMessage";body="$commitMessage`nStarted with https://github.com/$env:APPVEYOR_REPO_NAME/commit/$env:APPVEYOR_REPO_COMMIT`n[version update]";head="$newBranch";base="develop"} | ConvertTo-Json
+ $githubApiEndpoint = "https://api.github.com/repos/nanoframework/nf-interpreter/pulls"
+ [Net.ServicePointManager]::SecurityProtocol = [Net.SecurityProtocolType]::Tls12
+
+ try
+ {
+ $result = Invoke-RestMethod -Method Post -UserAgent [Microsoft.PowerShell.Commands.PSUserAgent]::InternetExplorer -Uri $githubApiEndpoint -Header @{"Authorization"="Basic $env:GitRestAuth"} -ContentType "application/json" -Body $prRequestBody
+ 'Started PR with version update...' | Write-Host -ForegroundColor White -NoNewline
+ 'OK' | Write-Host -ForegroundColor Green
+ }
+ catch
+ {
+ $result = $_.Exception.Response.GetResponseStream()
+ $reader = New-Object System.IO.StreamReader($result)
+ $reader.BaseStream.Position = 0
+ $reader.DiscardBufferedData()
+ $responseBody = $reader.ReadToEnd();
+
+ "Error starting PR: $responseBody" | Write-Host -ForegroundColor Red
+ }
+
+ # move back to home folder
+ & cd .. > $null
+ }
+}
diff --git a/generate-change-log.ps1 b/generate-change-log.ps1
new file mode 100644
index 0000000..a9d3395
--- /dev/null
+++ b/generate-change-log.ps1
@@ -0,0 +1,33 @@
+# Copyright (c) 2018 The nanoFramework project contributors
+# See LICENSE file in the project root for full license information.
+
+# generate change log when build is NOT a pull-request or not a tag (master OR release)
+if ($env:appveyor_pull_request_number -or
+ ($env:APPVEYOR_REPO_BRANCH -eq "master" -and $env:APPVEYOR_REPO_TAG -eq 'true') -or
+ ($env:APPVEYOR_REPO_BRANCH -match "^release*" -and $env:APPVEYOR_REPO_TAG -eq 'true') -or
+ $env:APPVEYOR_REPO_TAG -eq "true")
+{
+ 'Skip change log processing...' | Write-Host -ForegroundColor White
+}
+else
+{
+ # need this to keep ruby happy
+ md c:\tmp
+
+ if ($env:APPVEYOR_REPO_BRANCH -eq "master" -or $env:APPVEYOR_REPO_BRANCH -match "^release*")
+ {
+ # generate change log including future version
+ bundle exec github_changelog_generator --token $env:GitHubToken --future-release "v$env:GitVersion_MajorMinorPatch"
+ }
+ else
+ {
+ # generate change log
+ # version includes commits
+ bundle exec github_changelog_generator --token $env:GitHubToken
+ }
+
+ # updated changelog and the updated assembly info files
+ git add CHANGELOG.md
+ git commit -m "Update CHANGELOG for v$env:GitVersion_NuGetVersionV2"
+ git push origin --porcelain -q > $null
+}
diff --git a/install-vsix-appveyor.ps1 b/install-vsix-appveyor.ps1
index 4387432..dda0f6b 100644
--- a/install-vsix-appveyor.ps1
+++ b/install-vsix-appveyor.ps1
@@ -1,4 +1,9 @@
$vsixPath = "$($env:USERPROFILE)\nanoFramework.Tools.VS2017.Extension.vsix"
-(New-Object Net.WebClient).DownloadFile('https://visualstudiogallery.msdn.microsoft.com/18fe3370-32c4-49d6-bf02-1b0ab0b1e537/file/261095/11/nanoFramework.Tools.VS2017.Extension.vsix', $vsixPath)
+(New-Object Net.WebClient).DownloadFile('https://marketplace.visualstudio.com/_apis/public/gallery/publishers/vs-publisher-1470366/vsextensions/nanoFrameworkVS2017Extension/0/vspackage', $vsixPath)
"`"C:\Program Files (x86)\Microsoft Visual Studio\2017\Community\Common7\IDE\VSIXInstaller.exe`" /q /a $vsixPath" | out-file ".\install-vsix.cmd" -Encoding ASCII
-& .\install-vsix.cmd
+
+'Installing nanoFramework VS extension ...' | Write-Host -ForegroundColor White -NoNewline
+
+& .\install-vsix.cmd --quiet --no-verbose > $null
+
+'OK' | Write-Host -ForegroundColor Green
diff --git a/source/NuGet.Config b/source/NuGet.Config
new file mode 100644
index 0000000..efc7d1b
--- /dev/null
+++ b/source/NuGet.Config
@@ -0,0 +1,6 @@
+
+
+
+
+
+
diff --git a/source/Nuget.Windows.Devices.Spi.DELIVERABLES/Nuget.Windows.Devices.Spi.DELIVERABLES.nuproj b/source/Nuget.Windows.Devices.Spi.DELIVERABLES/Nuget.Windows.Devices.Spi.DELIVERABLES.nuproj
index bf7c25c..7eca339 100644
--- a/source/Nuget.Windows.Devices.Spi.DELIVERABLES/Nuget.Windows.Devices.Spi.DELIVERABLES.nuproj
+++ b/source/Nuget.Windows.Devices.Spi.DELIVERABLES/Nuget.Windows.Devices.Spi.DELIVERABLES.nuproj
@@ -10,29 +10,37 @@
AnyCPU
+
+ 1.0.0-preview001
+
-
+
content\Stubs\%(RecursiveDir)%(Filename)%(Extension)
-
+
content\txt\%(RecursiveDir)%(Filename)%(Extension)
-
+
content\dump\%(RecursiveDir)%(Filename)%(Extension)
-
+
content\dump\%(RecursiveDir)%(Filename)%(Extension)
-
+
content\resources\%(RecursiveDir)%(Filename)%(Extension)
-
+
content\disasm\%(RecursiveDir)%(Filename)%(Extension)
+
+
+ [1.0.1-preview134]
+
+
F117EC96-3B2D-4F2F-8683-BF72CA910624
@@ -42,7 +50,7 @@
nanoFramework.Windows.Devices.Spi.DELIVERABLES
- 1.0.0-preview019
+ $(GitVersion_NuGetVersionV2)
nanoFramework.Windows.Devices.Spi.DELIVERABLES
nanoFramework project contributors
nanoFramework project contributors
diff --git a/source/Nuget.Windows.Devices.Spi/Nuget.Windows.Devices.Spi.nuproj b/source/Nuget.Windows.Devices.Spi/Nuget.Windows.Devices.Spi.nuproj
index 8990440..0512a4a 100644
--- a/source/Nuget.Windows.Devices.Spi/Nuget.Windows.Devices.Spi.nuproj
+++ b/source/Nuget.Windows.Devices.Spi/Nuget.Windows.Devices.Spi.nuproj
@@ -10,20 +10,23 @@
AnyCPU
+
+ 1.0.0-preview001
+
-
+
lib\Windows.Devices.Spi.dll
-
+
lib\Windows.Devices.Spi.pdb
-
+
lib\Windows.Devices.Spi.pdbx
-
+
lib\Windows.Devices.Spi.pe
-
+
lib\Windows.Devices.Spi.xml
@@ -32,7 +35,7 @@
- [1.0.0-preview028]
+ [1.0.1-preview134]
@@ -44,7 +47,7 @@
nanoFramework.Windows.Devices.Spi
- 1.0.0-preview019
+ $(GitVersion_NuGetVersionV2)
nanoFramework.Windows.Devices.Spi
nanoFramework project contributors
nanoFramework project contributors
@@ -52,7 +55,7 @@
This package includes the Windows.Devices.Spi assembly for nanoFramework C# projects
- https://github.com/nanoframework/nf-class-libraries
+ https://github.com/nanoframework/lib-Windows.Devices.Spi
Copyright (c) 2017 The nanoFramework project contributors
diff --git a/source/DataBitOrder.cs b/source/Windows.Devices.Spi/DataBitOrder.cs
similarity index 94%
rename from source/DataBitOrder.cs
rename to source/Windows.Devices.Spi/DataBitOrder.cs
index ab69075..f9d2406 100644
--- a/source/DataBitOrder.cs
+++ b/source/Windows.Devices.Spi/DataBitOrder.cs
@@ -6,7 +6,7 @@
namespace Windows.Devices.Spi
{
///
- /// Defines the bit order of the data in the buffer to be transmited/received to/from the SPI bus.
+ /// Defines the bit order of the data in the buffer to be transmitted/received to/from the SPI bus.
///
/// This enum is specific to nanoFramework. Doesn't have correspondence in the UWP API.
public enum DataBitOrder
diff --git a/source/ISpiDeviceStatics.cs b/source/Windows.Devices.Spi/ISpiDeviceStatics.cs
similarity index 100%
rename from source/ISpiDeviceStatics.cs
rename to source/Windows.Devices.Spi/ISpiDeviceStatics.cs
diff --git a/source/AssemblyInfo.cs b/source/Windows.Devices.Spi/Properties/AssemblyInfo.cs
similarity index 82%
rename from source/AssemblyInfo.cs
rename to source/Windows.Devices.Spi/Properties/AssemblyInfo.cs
index f6f8dd5..b3aa196 100644
--- a/source/AssemblyInfo.cs
+++ b/source/Windows.Devices.Spi/Properties/AssemblyInfo.cs
@@ -15,5 +15,6 @@
// Build Number
// Revision
//
-[assembly: AssemblyVersion("1.0.0.19")]
-[assembly: AssemblyFileVersion("1.0.0.19")]
+[assembly: AssemblyVersion("1.0.0.0")]
+[assembly: AssemblyFileVersion("1.0.0.0")]
+[assembly: AssemblyInformationalVersion("1.0.0.0")]
diff --git a/source/Windows.Devices.Spi/README.txt b/source/Windows.Devices.Spi/README.txt
new file mode 100644
index 0000000..5493fc2
--- /dev/null
+++ b/source/Windows.Devices.Spi/README.txt
@@ -0,0 +1,5 @@
+After updating the Nuget package(s)
+
+1. After updating the Nuget packages, the project file (nfproj extension) has to be manually edited too in order to update the path for the new package for all tags.
+
+2. The nuproj files (in nanoFramework.Windows.Devices.Spi.Nuget.sln) have to be manually updated for the dependency versions to match the referenced packages.
diff --git a/source/SpiBusInfo.cs b/source/Windows.Devices.Spi/SpiBusInfo.cs
similarity index 100%
rename from source/SpiBusInfo.cs
rename to source/Windows.Devices.Spi/SpiBusInfo.cs
diff --git a/source/SpiController.cs b/source/Windows.Devices.Spi/SpiController.cs
similarity index 100%
rename from source/SpiController.cs
rename to source/Windows.Devices.Spi/SpiController.cs
diff --git a/source/SpiDevice.cs b/source/Windows.Devices.Spi/SpiDevice.cs
similarity index 100%
rename from source/SpiDevice.cs
rename to source/Windows.Devices.Spi/SpiDevice.cs
diff --git a/source/SpiMode.cs b/source/Windows.Devices.Spi/SpiMode.cs
similarity index 100%
rename from source/SpiMode.cs
rename to source/Windows.Devices.Spi/SpiMode.cs
diff --git a/source/SpiSharingMode.cs b/source/Windows.Devices.Spi/SpiSharingMode.cs
similarity index 100%
rename from source/SpiSharingMode.cs
rename to source/Windows.Devices.Spi/SpiSharingMode.cs
diff --git "a/source/Spi\342\200\213Connection\342\200\213Settings.cs" "b/source/Windows.Devices.Spi/Spi\342\200\213Connection\342\200\213Settings.cs"
similarity index 100%
rename from "source/Spi\342\200\213Connection\342\200\213Settings.cs"
rename to "source/Windows.Devices.Spi/Spi\342\200\213Connection\342\200\213Settings.cs"
diff --git a/source/Windows.Devices.Spi.nfproj b/source/Windows.Devices.Spi/Windows.Devices.Spi.nfproj
similarity index 61%
rename from source/Windows.Devices.Spi.nfproj
rename to source/Windows.Devices.Spi/Windows.Devices.Spi.nfproj
index 9653acc..e8b0960 100644
--- a/source/Windows.Devices.Spi.nfproj
+++ b/source/Windows.Devices.Spi/Windows.Devices.Spi.nfproj
@@ -1,6 +1,5 @@

-
$(MSBuildToolsPath)..\..\..\nanoFramework\v1.0\
@@ -8,13 +7,14 @@
Debug
AnyCPU
+ {11A8DD76-328B-46DF-9F39-F559912D0360};{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}
{A1042594-0DF3-427A-99E1-F77F862EC2F2}
Library
512
Windows.Devices.Spi
- v1.0
+ v1.0
True
bin\$(Configuration)\Windows.Devices.Spi.xml
@@ -22,7 +22,7 @@
true
- key.snk
+ ..\key.snk
false
@@ -44,13 +44,13 @@
false
-
+
false
-
+
@@ -61,19 +61,16 @@
-
+
-
- packages\nanoFramework.CoreLibrary.1.0.0-preview028\lib\mscorlib.dll
- True
- True
-
-
- packages\nanoFramework.CoreLibrary.1.0.0-preview028\lib\mscorlib.dll
+
+
+
+
+ ..\packages\nanoFramework.CoreLibrary.1.0.1-preview134\lib\mscorlib.dll
True
- True
@@ -82,12 +79,4 @@
-
-
- This project references NuGet package(s) that are missing on this computer. Use NuGet Package Restore to download them. For more information, see http://go.microsoft.com/fwlink/?LinkID=322105. The missing file is {0}.
-
-
-
-
-
-
\ No newline at end of file
+
diff --git a/source/packages.config b/source/Windows.Devices.Spi/packages.config
similarity index 71%
rename from source/packages.config
rename to source/Windows.Devices.Spi/packages.config
index b627caf..4b1ea00 100644
--- a/source/packages.config
+++ b/source/Windows.Devices.Spi/packages.config
@@ -1,6 +1,6 @@

-
+
\ No newline at end of file
diff --git a/source/key.snk b/source/key.snk
index 855e577..67c9bb0 100644
Binary files a/source/key.snk and b/source/key.snk differ
diff --git a/source/nanoFramework.Windows.Devices.Spi.sln b/source/nanoFramework.Windows.Devices.Spi.sln
index 36884d3..1d7793f 100644
--- a/source/nanoFramework.Windows.Devices.Spi.sln
+++ b/source/nanoFramework.Windows.Devices.Spi.sln
@@ -1,25 +1,20 @@

Microsoft Visual Studio Solution File, Format Version 12.00
# Visual Studio 15
-VisualStudioVersion = 15.0.26430.14
+VisualStudioVersion = 15.0.27130.2010
MinimumVisualStudioVersion = 10.0.40219.1
-Project("{11A8DD76-328B-46DF-9F39-F559912D0360}") = "Windows.Devices.Spi", "Windows.Devices.Spi.nfproj", "{A1042594-0DF3-427A-99E1-F77F862EC2F2}"
+Project("{11A8DD76-328B-46DF-9F39-F559912D0360}") = "Windows.Devices.Spi", "Windows.Devices.Spi\Windows.Devices.Spi.nfproj", "{A1042594-0DF3-427A-99E1-F77F862EC2F2}"
EndProject
-Project("{5DD5E4FA-CB73-4610-85AB-557B54E96AA9}") = "Nuget.Windows.Devices.Spi", "Nuget.Windows.Devices.Spi\Nuget.Windows.Devices.Spi.nuproj", "{298761A4-D2D4-4C23-B280-89034582C925}"
+Project("{FF286327-C783-4F7A-AB73-9BCBAD0D4460}") = "Nuget.Windows.Devices.Spi", "Nuget.Windows.Devices.Spi\Nuget.Windows.Devices.Spi.nuproj", "{298761A4-D2D4-4C23-B280-89034582C925}"
ProjectSection(ProjectDependencies) = postProject
{A1042594-0DF3-427A-99E1-F77F862EC2F2} = {A1042594-0DF3-427A-99E1-F77F862EC2F2}
EndProjectSection
EndProject
-Project("{5DD5E4FA-CB73-4610-85AB-557B54E96AA9}") = "Nuget.Windows.Devices.Spi.DELIVERABLES", "Nuget.Windows.Devices.Spi.DELIVERABLES\Nuget.Windows.Devices.Spi.DELIVERABLES.nuproj", "{F117EC96-3B2D-4F2F-8683-BF72CA910624}"
+Project("{FF286327-C783-4F7A-AB73-9BCBAD0D4460}") = "Nuget.Windows.Devices.Spi.DELIVERABLES", "Nuget.Windows.Devices.Spi.DELIVERABLES\Nuget.Windows.Devices.Spi.DELIVERABLES.nuproj", "{F117EC96-3B2D-4F2F-8683-BF72CA910624}"
ProjectSection(ProjectDependencies) = postProject
{A1042594-0DF3-427A-99E1-F77F862EC2F2} = {A1042594-0DF3-427A-99E1-F77F862EC2F2}
EndProjectSection
EndProject
-Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = ".nuget", ".nuget", "{E5DC0609-D746-4BBC-A4EB-01D2284D35F9}"
- ProjectSection(SolutionItems) = preProject
- packages.config = packages.config
- EndProjectSection
-EndProject
Global
GlobalSection(SolutionConfigurationPlatforms) = preSolution
Debug|Any CPU = Debug|Any CPU
@@ -42,4 +37,7 @@ Global
GlobalSection(SolutionProperties) = preSolution
HideSolutionNode = FALSE
EndGlobalSection
+ GlobalSection(ExtensibilityGlobals) = postSolution
+ SolutionGuid = {DD82D7FF-B798-48A4-8506-2FBA0001D32F}
+ EndGlobalSection
EndGlobal