Skip to content

Commit

Permalink
Merge branch 'release/1.0.0'
Browse files Browse the repository at this point in the history
  • Loading branch information
Steffen committed Aug 18, 2022
2 parents c7b9876 + 303bab5 commit 3768d6a
Show file tree
Hide file tree
Showing 34 changed files with 1,304 additions and 393 deletions.
36 changes: 36 additions & 0 deletions .build.ps1
Original file line number Diff line number Diff line change
@@ -0,0 +1,36 @@
<#
.Synopsis
Build script <https://github.com/nightroman/Invoke-Build>
.Example
# Create module from source.
Invoke-Build Build
.Example
# Add doc templates for new command.
# BE CAREFUL! Existing documents will be overwritten and must be discarded using git.
Invoke-Build Doc.Init -ForceDocInit
#>

param(
[ValidateSet('Debug', 'Release')]
[string] $Configuration = 'Debug',

[string] $NuGetApiKey = $env:nuget_apikey,

# Overwrite published versions
[switch] $ForcePublish,

# Add doc templates for new command.
[switch] $ForceDocInit,

# Version suffix to prereleases
[int] $BuildNumber
)

$ModuleName = 'PsSmo'

. $PSScriptRoot\tasks\Build.Tasks.ps1
. $PSScriptRoot\tasks\Dependencies.Tasks.ps1
. $PSScriptRoot\tasks\PsBuild.Tasks.ps1
16 changes: 16 additions & 0 deletions .devcontainer/Dockerfile
Original file line number Diff line number Diff line change
@@ -0,0 +1,16 @@
# See here for image contents: https://github.com/microsoft/vscode-dev-containers/tree/v0.241.1/containers/dotnet/.devcontainer/base.Dockerfile

# [Choice] .NET version: 6.0, 3.1, 6.0-bullseye, 3.1-bullseye, 6.0-focal, 3.1-focal
ARG VARIANT="6.0-bullseye-slim"
FROM mcr.microsoft.com/vscode/devcontainers/dotnet:0-${VARIANT}

# [Choice] Node.js version: none, lts/*, 18, 16, 14
ARG NODE_VERSION="none"
RUN if [ "${NODE_VERSION}" != "none" ]; then su vscode -c "umask 0002 && . /usr/local/share/nvm/nvm.sh && nvm install ${NODE_VERSION} 2>&1"; fi

# [Optional] Uncomment this section to install additional OS packages.
# RUN apt-get update && export DEBIAN_FRONTEND=noninteractive \
# && apt-get -y install --no-install-recommends <your-package-list-here>

# [Optional] Uncomment this line to install global node packages.
# RUN su vscode -c "source /usr/local/share/nvm/nvm.sh && npm install -g <your-package-here>" 2>&1
62 changes: 62 additions & 0 deletions .devcontainer/devcontainer.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,62 @@
// For format details, see https://aka.ms/devcontainer.json. For config options, see the README at:
// https://github.com/microsoft/vscode-dev-containers/tree/v0.241.1/containers/dotnet
{
"name": "C# (.NET)",
"build": {
"dockerfile": "Dockerfile",
"args": {
// Update 'VARIANT' to pick a .NET Core version: 3.1, 6.0
// Append -bullseye or -focal to pin to an OS version.
"VARIANT": "6.0-bullseye",
// Options
"NODE_VERSION": "none"
}
},

// Configure tool-specific properties.
"customizations": {
// Configure properties specific to VS Code.
"vscode": {
// Add the IDs of extensions you want installed when the container is created.
"extensions": [
"ms-dotnettools.csharp"
]
}
},

// Use 'forwardPorts' to make a list of ports inside the container available locally.
// "forwardPorts": [5000, 5001],

// [Optional] To reuse of your local HTTPS dev cert:
//
// 1. Export it locally using this command:
// * Windows PowerShell:
// dotnet dev-certs https --trust; dotnet dev-certs https -ep "$env:USERPROFILE/.aspnet/https/aspnetapp.pfx" -p "SecurePwdGoesHere"
// * macOS/Linux terminal:
// dotnet dev-certs https --trust; dotnet dev-certs https -ep "${HOME}/.aspnet/https/aspnetapp.pfx" -p "SecurePwdGoesHere"
//
// 2. Uncomment these 'remoteEnv' lines:
// "remoteEnv": {
// "ASPNETCORE_Kestrel__Certificates__Default__Password": "SecurePwdGoesHere",
// "ASPNETCORE_Kestrel__Certificates__Default__Path": "/home/vscode/.aspnet/https/aspnetapp.pfx",
// },
//
// 3. Do one of the following depending on your scenario:
// * When using GitHub Codespaces and/or Remote - Containers:
// 1. Start the container
// 2. Drag ~/.aspnet/https/aspnetapp.pfx into the root of the file explorer
// 3. Open a terminal in VS Code and run "mkdir -p /home/vscode/.aspnet/https && mv aspnetapp.pfx /home/vscode/.aspnet/https"
//
// * If only using Remote - Containers with a local container, uncomment this line instead:
// "mounts": [ "source=${env:HOME}${env:USERPROFILE}/.aspnet/https,target=/home/vscode/.aspnet/https,type=bind" ],

// Use 'postCreateCommand' to run commands after the container is created.
// "postCreateCommand": "dotnet restore",

// Comment out to connect as root instead. More info: https://aka.ms/vscode-remote/containers/non-root.
"remoteUser": "vscode",
"features": {
"docker-from-docker": "latest",
"powershell": "latest"
}
}
3 changes: 3 additions & 0 deletions .github/FUNDING.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
# These are supported funding model platforms

github: [abbgrade]
12 changes: 12 additions & 0 deletions .github/dependabot.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
# To get started with Dependabot version updates, you'll need to specify which
# package ecosystems to update and where the package manifests are located.
# Please see the documentation for all configuration options:
# https://docs.github.com/github/administering-a-repository/configuration-options-for-dependency-updates

version: 2
updates:
- package-ecosystem: "nuget" # See documentation for possible values
directory: "/src/PsSmo" # Location of package manifests
schedule:
interval: "daily"
target-branch: "develop"
9 changes: 9 additions & 0 deletions .github/workflows/build-validation.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
on:
push:
branches: [ develop, bugfix/*, feature/*, release/* ]
pull_request:
branches: [ develop ]

jobs:
build-validation:
uses: abbgrade/PsBuildTasks/.github/workflows/build-validation-matrix.yml@1.4.0
12 changes: 12 additions & 0 deletions .github/workflows/pre-release.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
on:
push:
branches: [ release/* ]
workflow_dispatch:

jobs:
pre-release:
uses: abbgrade/PsBuildTasks/.github/workflows/pre-release-windows.yml@1.4.0
with:
module-name: PsSmo
secrets:
ps-gallery-key: ${{ secrets.PS_GALLERY_KEY }}
12 changes: 12 additions & 0 deletions .github/workflows/release.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
on:
push:
branches: [ main ]
workflow_dispatch:

jobs:
release:
uses: abbgrade/PsBuildTasks/.github/workflows/release-windows.yml@1.4.0
with:
module-name: PsSmo
secrets:
ps-gallery-key: ${{ secrets.PS_GALLERY_KEY }}
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
publish
bin
obj
coverage.xml
Expand Down
6 changes: 6 additions & 0 deletions .vscode/extensions.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
{
"recommendations": [
"ms-vscode.powershell",
"vector-of-bool.gitflow"
]
}
3 changes: 2 additions & 1 deletion .vscode/settings.json
Original file line number Diff line number Diff line change
Expand Up @@ -3,5 +3,6 @@
"files.insertFinalNewline": true,
"editor.tabSize": 4,
"editor.formatOnSave": false,
"powershell.codeFormatting.addWhitespaceAroundPipe": true
"powershell.codeFormatting.addWhitespaceAroundPipe": true,
"cSpell.language": "en"
}
89 changes: 26 additions & 63 deletions .vscode/tasks.json
Original file line number Diff line number Diff line change
@@ -1,16 +1,15 @@
// Do not edit! This file is generated by New-VSCodeTask.ps1
// Modify the build script or tasks-merge.json and recreate.
{
// See https://go.microsoft.com/fwlink/?LinkId=733558
// for the documentation about the tasks.json format
"version": "2.0.0",
"windows": {
"options": {
"shell": {
"executable": "pwsh.exe",
"args": [
"-NoProfile",
"-ExecutionPolicy Bypass",
"-NonInteractive",
"-ExecutionPolicy",
"Bypass",
"-Command"
]
}
Expand All @@ -20,94 +19,58 @@
"options": {
"shell": {
"executable": "/usr/bin/pwsh",
"args": [
"-NoProfile",
"-Command"
]
"args": [ "-NoProfile", "-Command" ]
}
}
},
"osx": {
"options": {
"shell": {
"executable": "/usr/local/bin/pwsh",
"args": [
"-NoProfile",
"-Command"
]
"args": [ "-NoProfile", "-Command" ]
}
}
},
"tasks": [
{
"label": "build",
"group": "build",
"type": "shell",
"command": "Invoke-Build",
"args": ["build"],
"problemMatcher": "$msCompile",
"presentation": {
"echo": false,
"showReuseMessage": false
}
},
{
"label": "clean",
"label": "Build",
"type": "shell",
"command": "Invoke-Build",
"args": ["clean"],
"problemMatcher": "$msCompile",
"presentation": {
"echo": false,
"showReuseMessage": false
}
"group": "build",
"command": "Invoke-Build Build",
"problemMatcher": []
},
{
"label": "test",
"group": "test",
"label": "Clean",
"type": "shell",
"command": "Invoke-Pester",
"args": ["-Output", "Detailed"],
"options": {
"cwd": "test"
},
"problemMatcher": "$msCompile",
"presentation": {
"echo": false,
"showReuseMessage": false
},
"dependsOn": "build"
"command": "Invoke-Build Clean",
"problemMatcher": []
},
{
"label": "install",
"label": "Install",
"type": "shell",
"command": "Invoke-Build",
"args": ["install", "-Configuration", "Release"],
"problemMatcher": "$msCompile",
"presentation": {
"echo": false,
"showReuseMessage": false
}
"command": "Invoke-Build Install",
"problemMatcher": []
},
{
"label": ".",
"label": "Update docs",
"type": "shell",
"command": "Invoke-Build -Task .",
"problemMatcher": "$msCompile",
"presentation": {
"echo": false,
"showReuseMessage": false
}
"command": "Invoke-Build UpdateDocs",
"problemMatcher": []
},
{
"label": "?",
"label": "Test",
"group": "test",
"type": "shell",
"command": "Invoke-Build -Task ?",
"command": "Invoke-Pester",
"options": {
"cwd": "${workspaceFolder}/test"
},
"problemMatcher": "$msCompile",
"presentation": {
"echo": false,
"showReuseMessage": false
}
},
"dependsOn": "Build"
}
]
}
68 changes: 68 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,68 @@
# Changelog

All notable changes to this project will be documented in this file.

The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/),
and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html).

## [Unreleased]

## [1.0.0] - 2022-08-18

### Added

- Added Get-Table command.
- Added output to all commands.

### Changed

- Updated to net6.0
- Updated from System.Data.SqlClient to Microsoft.Data.SqlClient.
- Updated from PowerShellStandard.Library to System.Management.Automation
- Updated Microsoft.SqlServer.SqlManagementObjects
- Added pipeline input for `Disconnect-Instance`

### Fixed

- ErrorAction parameter works for `Invoke-Command`.

## [0.5.0] - 2021-10-15

### Added

- Added sql command output handler.
- Added support for line commends in scripts.

### Fixed

- Fixed variables with quoted values.

## [0.4.0] - 2021-09-27

### Added

- Added more parameter sets for `Connect-SmoInstance`.

### Fixed

- Fixed connection exception for Azure SQL.

## [0.3.0] - 2021-09-16

### Added

- Added `$(Variable)` and `:setvar Variable Value` support.

## [0.2.0] - 2021-09-15

### Added

- Added `Invoke-SmoCommand` with batch support (`GO` statement).

## [0.1.0] - 2021-09-12

### Added

- Added `Connect-SmoInstance` and `Disconnect-SmoInstance` commands.

<!-- markdownlint-configure-file {"MD024": { "siblings_only": true } } -->
Loading

0 comments on commit 3768d6a

Please sign in to comment.