Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[WIP] Microsoft.PowerShell.DSC module #507

Open
wants to merge 11 commits into
base: main
Choose a base branch
from
Open
3 changes: 2 additions & 1 deletion .vscode/settings.json
Original file line number Diff line number Diff line change
Expand Up @@ -21,5 +21,6 @@
"schemas/2024/04/bundled/config/document.vscode.json": "**.dsc.{yaml,yml,config.yaml,config.yml}",
"schemas/2024/04/bundled/resource/manifest.vscode.json": "**.dsc.resource.{yaml,yml}"
},
"sarif-viewer.connectToGithubCodeScanning": "off"
"sarif-viewer.connectToGithubCodeScanning": "off",
"powershell.codeFormatting.preset": "Allman"
}
1 change: 1 addition & 0 deletions operation-methods
Submodule operation-methods added at 3f42f5
15 changes: 15 additions & 0 deletions powershell-helpers/Microsoft.PowerShell.DSC/.gitattributes
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
# Needed for publishing of examples, build worker defaults to core.autocrlf=input.
* text eol=autocrlf

*.mof text eol=crlf
*.sh text eol=lf
*.svg eol=lf

# Ensure any exe files are treated as binary
*.exe binary
*.jpg binary
*.xl* binary
*.pfx binary
*.png binary
*.dll binary
*.so binary
17 changes: 17 additions & 0 deletions powershell-helpers/Microsoft.PowerShell.DSC/.gitignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,17 @@
output/

**.bak
*.local.*
!**/README.md
.kitchen/

*.nupkg
*.suo
*.user
*.coverage
.vs
.psproj
.sln
markdownissues.txt
node_modules
package-lock.json
125 changes: 125 additions & 0 deletions powershell-helpers/Microsoft.PowerShell.DSC/.vscode/tasks.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,125 @@
{
"version": "2.0.0",
"_runner": "terminal",
"windows": {
"options": {
"shell": {
"executable": "C:\\Windows\\System32\\WindowsPowerShell\\v1.0\\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": "build",
"type": "shell",
"command": "&${cwd}/build.ps1",
"args": [],
"presentation": {
"echo": true,
"reveal": "always",
"focus": true,
"panel": "new",
"clear": false
},
"runOptions": {
"runOn": "default"
},
"problemMatcher": [
{
"owner": "powershell",
"fileLocation": [
"absolute"
],
"severity": "error",
"pattern": [
{
"regexp": "^\\s*(\\[-\\]\\s*.*?)(\\d+)ms\\s*$",
"message": 1
},
{
"regexp": "(.*)",
"code": 1
},
{
"regexp": ""
},
{
"regexp": "^.*,\\s*(.*):\\s*line\\s*(\\d+).*",
"file": 1,
"line": 2
}
]
}
]
},
{
"label": "test",
"type": "shell",
"command": "&${cwd}/build.ps1",
"args": ["-AutoRestore","-Tasks","test"],
"presentation": {
"echo": true,
"reveal": "always",
"focus": true,
"panel": "dedicated",
"showReuseMessage": true,
"clear": false
},
"problemMatcher": [
{
"owner": "powershell",
"fileLocation": [
"absolute"
],
"severity": "error",
"pattern": [
{
"regexp": "^\\s*(\\[-\\]\\s*.*?)(\\d+)ms\\s*$",
"message": 1
},
{
"regexp": "(.*)",
"code": 1
},
{
"regexp": ""
},
{
"regexp": "^.*,\\s*(.*):\\s*line\\s*(\\d+).*",
"file": 1,
"line": 2
}
]
}
]
}
]
}
31 changes: 31 additions & 0 deletions powershell-helpers/Microsoft.PowerShell.DSC/CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,31 @@
# Changelog for Microsoft.PowerShell.DSC

The format is based on and uses the types of changes according to [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]

### Added

- For new features.

### Changed

- For changes in existing functionality.

### Deprecated

- For soon-to-be removed features.

### Removed

- For now removed features.

### Fixed

- For any bug fix.

### Security

- In case of vulnerabilities.

40 changes: 40 additions & 0 deletions powershell-helpers/Microsoft.PowerShell.DSC/GitVersion.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,40 @@
mode: ContinuousDelivery
next-version: 0.0.1
major-version-bump-message: '(breaking\schange|breaking|major)\b'
minor-version-bump-message: '(adds?|features?|minor)\b'
patch-version-bump-message: '\s?(fix|patch)'
no-bump-message: '\+semver:\s?(none|skip)'
assembly-informational-format: '{NuGetVersionV2}+Sha.{Sha}.Date.{CommitDate}'
branches:
master:
tag: preview
regex: ^main$
pull-request:
tag: PR
feature:
tag: useBranchName
increment: Minor
regex: f(eature(s)?)?[\/-]
source-branches: ['master']
hotfix:
tag: fix
increment: Patch
regex: (hot)?fix(es)?[\/-]
source-branches: ['master']

ignore:
sha: []
merge-message-formats: {}


# feature:
# tag: useBranchName
# increment: Minor
# regex: f(eature(s)?)?[/-]
# source-branches: ['master']
# hotfix:
# tag: fix
# increment: Patch
# regex: (hot)?fix(es)?[/-]
# source-branches: ['master']

13 changes: 13 additions & 0 deletions powershell-helpers/Microsoft.PowerShell.DSC/README.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
# Microsoft.PowerShell.DSC

PowerShell Desired State Configuration Module for working with `dsc.exe`

## Make it yours

---
Generated with Plaster and the SampleModule template


This is a sample Readme

## Make it yours
20 changes: 20 additions & 0 deletions powershell-helpers/Microsoft.PowerShell.DSC/RequiredModules.psd1
Original file line number Diff line number Diff line change
@@ -0,0 +1,20 @@
@{
PSDependOptions = @{
AddToPath = $true
Target = 'output\RequiredModules'
Parameters = @{
Repository = 'PSGallery'
}
}

InvokeBuild = 'latest'
PSScriptAnalyzer = 'latest'
Pester = 'latest'
ModuleBuilder = 'latest'
ChangelogManagement = 'latest'
Sampler = 'latest'
'Sampler.GitHubTasks' = 'latest'
Yayaml = 'latest'

}

Loading