Skip to content

Commit

Permalink
(GH228) Project structure refactor
Browse files Browse the repository at this point in the history
* add VSCode tasks file

* Separate functions into individual files under new [psake] subfolder
Add comment-based help

* Add tasks (with dependencies) to build script

* Add markdown help docs for functions

* Don't change location when testing for [psake] global variable

* Update tests to account for new location of module

* ignore Pester test results

* Save Pester test results to root of project

* Update nuget.exe to 4.3.0.4406

* Add build task for creating nuget package

* Update nuget package scripts to account for module layout change

* Fix string formatting for failure message in [Assert] function

* Put parameter position statements back

* Remove module during Chocolatey uninstall process

* Fix specs for testing expected doc content

* Ugly hack to account for dot net core versions installed on Windows.
This is only to prevent an exception from being thrown when using the "Framework" function and specifying "1.1.0" or "2.0.0" and won't be found in [$env:windir\Microsoft.NET\]

* Ensure PSScriptAnalyzer module is installed for testing

* Use correct variable with uploading Pester test results to AppVeyor

* Remove direct calls to Analyze and Pester tasks as they are defined as dependencies and will be executed automatically

* Remove aliases, format script

* Install PowerShell version 6.0.0-rc for Linux/macOS

* Use [pwsh] instead of [PowerShell] on Linux/macOS

* Rename internal build function to Invoke-Step to not stomp on psake's Invoke-Task function

* Install latest version of build depedency modules

* Simplify spec tests

* Use v2 VSCode task format

* Fix case sensitivity on Linux and ensure errors aren't squashed on loading

* Remove PS v2.0 support

* Remove unneeded VSCode task property

* Rename psake folder to src

* Move secondary psake files used by Chocolatey to src

* Move nuget files to build folder

* Remove obsolete build/test files

* Update tests to account for new src folder

* Add Build/Clean tasks

* Ignore versioned output directories

* Install modules using correct parameter values

* Prevent VSCode workspace searches from finding matches in the output folders
  • Loading branch information
devblackops committed Nov 21, 2017
1 parent b252583 commit 7d42673
Show file tree
Hide file tree
Showing 70 changed files with 4,103 additions and 1,311 deletions.
4 changes: 3 additions & 1 deletion .gitignore
Original file line number Diff line number Diff line change
@@ -1,4 +1,6 @@
[B|b]in
*.nupkg
Thumbs.db
/dotnet-install.ps1
/dotnet-install.ps1
testResults.xml
[0-9].[0-9].[0-9]/
2 changes: 1 addition & 1 deletion .travis.yml
Original file line number Diff line number Diff line change
Expand Up @@ -17,4 +17,4 @@ install:

script:
- ulimit -n 4096
- powershell -file build.ps1
- pwsh -file build.ps1
6 changes: 5 additions & 1 deletion .vscode/settings.json
Original file line number Diff line number Diff line change
Expand Up @@ -2,5 +2,9 @@
"files.trimTrailingWhitespace": true,
"files.insertFinalNewline": true,
"editor.insertSpaces": true,
"editor.tabSize": 4
"editor.tabSize": 4,
"files.exclude": {
"**/.git": true,
"?.?.?/": true
}
}
84 changes: 84 additions & 0 deletions .vscode/tasks.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,84 @@
{
// See https://go.microsoft.com/fwlink/?LinkId=733558
// for the documentation about the tasks.json format
"version": "2.0.0",

// Start PowerShell (pwsh on *nix)
"windows": {
"options": {
"shell": {
"executable": "powershell.exe",
"args": [ "-NoProfile", "-ExecutionPolicy", "Bypass", "-Command" ]
}
}
},
"linux": {
"options": {
"shell": {
"executable": "/usr/bin/pwsh",
"args": [ "-NoProfile", "-Command" ]
}
}
},
"osx": {
"options": {
"shell": {
"executable": "/usr/local/bin/pwsh",
"args": [ "-NoProfile", "-Command" ]
}
}
},

"tasks": [
{
"label": "CreateMarkdownHelp",
"type": "shell",
"command": "${cwd}/build.ps1 -Task CreateMarkdownHelp -Verbose"
},
{
"label": "PublishPSGallery",
"type": "shell",
"command": "${cwd}/build.ps1 -Task PublishPSGallery -Verbose"
},
{
"label": "PublishChocolatey",
"type": "shell",
"command": "${cwd}/build.ps1 -Task PublishChocolatey -Verbose"
},
{
"label": "Test",
"type": "shell",
"command": "${cwd}/build.ps1 -Task Test -Verbose",
"group": {
"kind": "test",
"isDefault": true
},
"problemMatcher": "$pester"
},
{
"label": "Build",
"type": "shell",
"command": "${cwd}/build.ps1 -Task Build -Verbose",
"group": {
"kind": "build",
"isDefault": true
}
},
{
"label": "BuildNuget",
"type": "shell",
"command": "${cwd}/build.ps1 -Task BuildNuget -Verbose"
},
{
"label": "Analyze",
"type": "shell",
"command": "${cwd}/build.ps1 -Task Analyze -Verbose"
},
{
"label": "Pester",
"type": "shell",
"command": "${cwd}/build.ps1 -Task Pester -Verbose",
"problemMatcher": "$pester"
}
]
}
Binary file removed NuGet.exe
Binary file not shown.
28 changes: 0 additions & 28 deletions NuGetPackageBuilder.ps1

This file was deleted.

0 comments on commit 7d42673

Please sign in to comment.