Skip to content

Commit 1c7ba57

Browse files
authored
Merge pull request #39 from asizikov/feature/fake-build
Update SDK 2016.2
2 parents 8f696f0 + 031868d commit 1c7ba57

29 files changed

+235
-406
lines changed

.editorconfig

Lines changed: 17 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,17 @@
1+
# Install the EditorConfig VS plugin to automatically apply formatting settings to this solution
2+
# See http://editorconfig.org/ for syntax
3+
4+
# top-most EditorConfig file
5+
root = true
6+
7+
[*.config]
8+
indent_style = space
9+
indent_size = 2
10+
11+
[*.cs]
12+
indent_style = space
13+
indent_size = 4
14+
15+
[*]
16+
indent_style = space
17+
indent_size = 4

.gitignore

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -184,4 +184,8 @@ FakesAssemblies/
184184
*.lock.json
185185
*.nuget.props
186186
*.nuget.targets
187-
.vs
187+
.vs
188+
189+
/.fake
190+
/build
191+
/deploy

AsyncSuffix/AsyncSuffix.nuspec renamed to AsyncSuffix.nuspec

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -10,15 +10,15 @@
1010
<requireLicenseAcceptance>false</requireLicenseAcceptance>
1111
<description>Task returning method's naming analyzer. Async methods should have 'Async' suffix.</description>
1212
<releaseNotes>
13-
&#8226;ReSharper 2016.1 support;
14-
</releaseNotes>
13+
&#8226;ReSharper 2016.2 support;
14+
</releaseNotes>
1515
<language>en-US</language>
1616
<tags>async method, naming, task</tags>
1717
<dependencies>
18-
<dependency id="Wave" version="[5.0]" />
18+
<dependency id="Wave" version="[6.0,7.0)" />
1919
</dependencies>
2020
</metadata>
2121
<files>
22-
<file src="bin\Release\Sizikov.AsyncSuffix.dll" target="dotFiles" />
22+
<file src="build\Sizikov.AsyncSuffix.dll" target="dotFiles" />
2323
</files>
2424
</package>

AsyncSuffix/AsyncSuffix.csproj

Lines changed: 0 additions & 260 deletions
This file was deleted.

AsyncSuffix/packages.config

Lines changed: 0 additions & 57 deletions
This file was deleted.

GitVersionConfig.yaml renamed to GitVersion.yml

Lines changed: 5 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -2,17 +2,16 @@ assembly-informational-format: '{NuGetVersion}'
22
mode: ContinuousDeployment
33
branches:
44
master:
5-
tag: s
6-
releases?[/-]:
75
tag: rc
6+
increment: Minor
87
features?[/-]:
9-
tag: useBranchName
8+
tag: rc-{BranchName}
109
increment: Minor
1110
(pull|pull\-requests|pr)[/-]:
12-
tag: pr
11+
tag: rc-pr-{BranchName}
12+
increment: Minor
1313
hotfix(es)?[/-]:
1414
tag: rc
15-
support[/-]:
16-
tag: s
15+
increment: Patch
1716
dev(elop)?(ment)?$:
1817
tag: b

appveyor.yml

Lines changed: 15 additions & 78 deletions
Original file line numberDiff line numberDiff line change
@@ -1,78 +1,15 @@
1-
-
2-
branches:
3-
only:
4-
- master
5-
- develop
6-
configuration: Release
7-
platform: Any CPU
8-
cache:
9-
- packages -> **\packages.config
10-
- C:\ProgramData\chocolatey\bin -> appveyor.yml
11-
- C:\ProgramData\chocolatey\lib -> appveyor.yml
12-
install:
13-
- choco install gitversion.portable -y
14-
environment:
15-
resharper_nuget_api_key:
16-
secure: RjiHK3Oxp74LUrI1/vmc2S36zOSRLxFM1Eq0Qn4hixWiou11jFqUbW2ukMNXrazP
17-
before_build:
18-
- ps: nuget restore
19-
- ps: gitversion /l console /output buildserver /updateassemblyinfo /b (get-item env:APPVEYOR_REPO_BRANCH).Value
20-
build:
21-
project: AsyncSuffix.sln
22-
verbosity: minimal
23-
test: off
24-
after_build:
25-
- ps: nuget pack AsyncSuffix/AsyncSuffix.nuspec -Version (get-item env:GitVersion_InformationalVersion).Value
26-
- ps: if(-not $env:APPVEYOR_PULL_REQUEST_NUMBER){ nuget push *.nupkg -ApiKey (get-item env:resharper_nuget_api_key).Value -Source https://resharper-plugins.jetbrains.com }
27-
-
28-
branches:
29-
only:
30-
- /feature/.*/
31-
configuration: Release
32-
platform: Any CPU
33-
pull_requests:
34-
do_not_increment_build_number: true
35-
cache:
36-
- packages -> **\packages.config
37-
- C:\ProgramData\chocolatey\bin -> appveyor.yml
38-
- C:\ProgramData\chocolatey\lib -> appveyor.yml
39-
install:
40-
- choco install gitversion.portable -y
41-
environment:
42-
private_nuget_api_key:
43-
secure: JiwfYhXw/Qj6yC2oJcixcgH7gChQmZp8HDPJY1MKxBY=
44-
nuget:
45-
account_feed: true
46-
before_build:
47-
- ps: nuget restore
48-
- ps: gitversion /l console /output buildserver /updateassemblyinfo /b (get-item env:APPVEYOR_REPO_BRANCH).Value
49-
build:
50-
project: AsyncSuffix.sln
51-
verbosity: minimal
52-
test: off
53-
after_build:
54-
- ps: nuget pack AsyncSuffix/AsyncSuffix.nuspec -Version (get-item env:GitVersion_InformationalVersion).Value
55-
- ps: nuget push *.nupkg -ApiKey (get-item env:private_nuget_api_key).Value -Source https://ci.appveyor.com/nuget/asizikov-private/api/v2/package
56-
-
57-
branches:
58-
only:
59-
- /.*/merge/
60-
configuration: Release
61-
platform: Any CPU
62-
pull_requests:
63-
do_not_increment_build_number: true
64-
cache:
65-
- packages -> **\packages.config
66-
- C:\ProgramData\chocolatey\bin -> appveyor.yml
67-
- C:\ProgramData\chocolatey\lib -> appveyor.yml
68-
install:
69-
- choco install gitversion.portable -y
70-
nuget:
71-
account_feed: true
72-
before_build:
73-
- ps: nuget restore
74-
- ps: gitversion /l console /output buildserver /updateassemblyinfo /b (get-item env:APPVEYOR_REPO_BRANCH).Value
75-
build:
76-
project: AsyncSuffix.sln
77-
verbosity: minimal
78-
test: off
1+
init:
2+
- git config --global core.autocrlf input
3+
install:
4+
- choco install gitversion.portable -y
5+
before_build:
6+
- ps: gitversion /l console /output buildserver /b (get-item env:APPVEYOR_REPO_BRANCH).Value
7+
build_script:
8+
- cmd: build.bat BuildApp
9+
test: off
10+
nuget:
11+
account_feed: false
12+
project_feed: false
13+
environment:
14+
resharper_nuget_api_key:
15+
secure: RjiHK3Oxp74LUrI1/vmc2S36zOSRLxFM1Eq0Qn4hixWiou11jFqUbW2ukMNXrazP

build.bat

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
@echo off
2+
cls
3+
"tools\nuget\NuGet.exe" "Install" "FAKE" "-OutputDirectory" "packages" "-ExcludeVersion"
4+
"tools\nuget\NuGet.exe" restore ./src/AsyncSuffix.sln
5+
"packages\FAKE\tools\Fake.exe" build.fsx

build.fsx

Lines changed: 96 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,96 @@
1+
// include Fake lib
2+
#r @"packages/FAKE/tools/FakeLib.dll"
3+
open Fake
4+
open Fake.AppVeyor
5+
6+
// Project parameters
7+
8+
let buildDir = "./build/"
9+
let packagingDir = "./.deploy/"
10+
let baseVersion = "2016.2.0"
11+
12+
let version =
13+
match buildServer with
14+
| AppVeyor -> environVar "GitVersion_NuGetVersionV2"
15+
| _ -> baseVersion + "-local"
16+
17+
let isPullRequest =
18+
let prNumber =
19+
match buildServer with
20+
| AppVeyor -> environVarOrNone "APPVEYOR_PULL_REQUEST_NUMBER"
21+
| _ -> None
22+
match prNumber with
23+
| Some(_) -> true
24+
| None -> false
25+
26+
// NuGet
27+
let projectName = "AsyncSuffix"
28+
let nuspecFileName = projectName + ".nuspec"
29+
let packageName = "Sizikov." + projectName
30+
let galleryUri = "https://resharper-plugins.jetbrains.com"
31+
32+
let apiKey =
33+
match buildServer with
34+
| AppVeyor -> environVar "resharper_nuget_api_key"
35+
| _ -> "Nothing here"
36+
37+
38+
Target "Clean" (fun _ ->
39+
CleanDirs [buildDir; packagingDir]
40+
)
41+
42+
Target "BuildApp" (fun _ ->
43+
!! "src/**/*.csproj"
44+
|> MSBuild buildDir "Build" [ "Configuration", "Release" ]
45+
|> Log "AppBuild-Output: "
46+
)
47+
48+
Target "Default" (fun _ ->
49+
DoNothing()
50+
)
51+
Target "CreatePackage" (fun _ ->
52+
NuGet (fun p ->
53+
{p with
54+
OutputPath = packagingDir
55+
WorkingDir = "."
56+
Version = version
57+
Publish = false })
58+
nuspecFileName
59+
)
60+
61+
Target "PublishPackage" (fun _ ->
62+
let branch = Fake.Git.Information.getBranchName "."
63+
if branch = "master" then
64+
if isLocalBuild then
65+
trace "Package can only be published from Appveyor build"
66+
else
67+
match buildServer with
68+
| AppVeyor ->
69+
if isPullRequest then
70+
trace "Skip publish from PR"
71+
else
72+
NuGetPublish (fun p ->
73+
{ p with
74+
AccessKey = apiKey
75+
PublishUrl = galleryUri
76+
NoPackageAnalysis = true
77+
Publish = true
78+
WorkingDir = packagingDir
79+
OutputPath = packagingDir
80+
Project = packageName
81+
Version = version
82+
})
83+
| _ -> trace "Do not publish from local build"
84+
else
85+
trace "Package can only be published from master branch"
86+
DoNothing()
87+
88+
)
89+
90+
"Clean"
91+
==> "BuildApp"
92+
==> "CreatePackage"
93+
==> "PublishPackage"
94+
==> "Default"
95+
96+
RunTargetOrDefault "Default"
File renamed without changes.

0 commit comments

Comments
 (0)