Skip to content

Commit

Permalink
wip - implement modulebuilder
Browse files Browse the repository at this point in the history
  • Loading branch information
Shawn Melton committed Oct 6, 2023
1 parent 0b239e3 commit 6ca5a78
Show file tree
Hide file tree
Showing 27 changed files with 210 additions and 500 deletions.
Binary file added .DS_Store
Binary file not shown.
26 changes: 26 additions & 0 deletions .editorconfig
Original file line number Diff line number Diff line change
@@ -0,0 +1,26 @@
# EditorConfig is awesome: http://EditorConfig.org
#
# Copied from https://github.com/PowerShell/PowerShellEditorServices/blob/master/.editorconfig

# top-most EditorConfig file
root = true

[*]
charset = utf-8
indent_style = space
insert_final_newline = true

[*.{cs}]
indent_size = 4
trim_trailing_whitespace = true

[*.{json}]
indent_size = 2
trim_trailing_whitespace = true

[*.{ps1,psm1,psd1}]
indent_size = 4
trim_trailing_whitespace = true

[*.{ps1xml,props,xml,yaml}]
indent_size = 2
4 changes: 4 additions & 0 deletions .gitattributes
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
# Define the line ending behavior of the different file extensions
# Set default behavior, in case users don't have core.autocrlf set.
* text=auto
* text eol=lf
61 changes: 61 additions & 0 deletions .github/workflows/build.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,61 @@
name: Build on push
on: [push]
jobs:
build:
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v2
- name: GitVersion
id: gitversion
uses: PoshCode/Actions/gitversion@v1
- name: Install-RequiredModules
uses: PoshCode/Actions/install-requiredmodules@v1
- name: Build Module
id: build
uses: PoshCode/actions/build-module@v1
with:
path: ${{ github.workspace }}/source
version: ${{ steps.gitversion.outputs.LegacySemVerPadded }}
destination: ${{ github.workspace }}/output
- name: Upload Build Output
uses: actions/upload-artifact@v2
with:
name: Modules
path: ${{ github.workspace }}/output
- name: Upload Tests
uses: actions/upload-artifact@v2
with:
name: PesterTests
path: ${{ github.workspace }}/tests
- name: Upload RequiredModules.psd1
uses: actions/upload-artifact@v2
with:
name: RequiredModules
path: ${{ github.workspace }}/RequiredModules.psd1
- name: Upload PSScriptAnalyzerSettings.psd1
uses: actions/upload-artifact@v2
with:
name: ScriptAnalyzer
path: ${{ github.workspace }}/PSScriptAnalyzerSettings.psd1
test:
runs-on: ${{ matrix.os }}
strategy:
fail-fast: false
matrix:
os: [windows-latest, ubuntu-latest, macos-latest]
needs: build
steps:
- name: Download Build Output
uses: actions/download-artifact@v2
- uses: PoshCode/Actions/install-requiredmodules@v1
- uses: PoshCode/Actions/pester@v1
with:
codeCoveragePath: Modules/Configuration
moduleUnderTest: Configuration
additionalModulePaths: ${{ github.workspace }}/Modules
- name: Upload Results
uses: actions/upload-artifact@v2
with:
name: Pester Results
path: ${{ github.workspace }}/*.xml
23 changes: 0 additions & 23 deletions .github/workflows/testimport.yml

This file was deleted.

24 changes: 0 additions & 24 deletions .github/workflows/validate_target_branch.yml

This file was deleted.

8 changes: 6 additions & 2 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -5,5 +5,9 @@
[Ll]og/
[Ll]ogs/

src/output/*
release.md
# Ignore version number folders and "output" where we build
[0-9]*/
obj/
Output/
Tools/
coverage.xml
24 changes: 3 additions & 21 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -7,24 +7,6 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0

## 0.1.0 -- 2021-01-31

### Breaking Changes

* None

### Bug Fixes

* None

### New Stuff

* None

### General Updates

* [1f41b26](https://github.com/wsmelton/dbalight/commits/1f41b2638ed25644888d12c748317d94f2ffed85) tests update
* [1adfb36](https://github.com/wsmelton/dbalight/commits/1adfb36ea826edccec1944e3d548dda1ddbbccc0) starting line
* [cb06d23](https://github.com/wsmelton/dbalight/commits/cb06d23d5db8083aaa8a91e831d2931fd5598c57) Initial commit

### Tests

* None
- [1f41b26](https://github.com/wsmelton/dbalight/commits/1f41b2638ed25644888d12c748317d94f2ffed85) tests update
- [1adfb36](https://github.com/wsmelton/dbalight/commits/1adfb36ea826edccec1944e3d548dda1ddbbccc0) starting line
- [cb06d23](https://github.com/wsmelton/dbalight/commits/cb06d23d5db8083aaa8a91e831d2931fd5598c57) Initial commit
17 changes: 17 additions & 0 deletions GitVersion.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,17 @@
mode: Mainline
commit-message-incrementing: MergeMessageOnly
assembly-versioning-format: '{Major}.{Minor}.{Patch}.{env:BUILDCOUNT ?? 0}'
assembly-informational-format: '{NuGetVersionV2}+Build.{env:BUILDCOUNT ?? 0}.Date.{CommitDate}.Branch.{env:SAFEBRANCHNAME ?? unknown}.Sha.{Sha}'
next-version: 1.0.0
branches:
main:
increment: Patch
pull-request:
tag: rc
increment: Patch
features:
increment: Patch
regex: .*?/
source-branches:
- main
- features
23 changes: 23 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,2 +1,25 @@
# dbalight
🔦 into your SQL Server to find, test, troubleshoot or report on your environment

## Installation

Install the [Microsoft.SqlServer.SqlManagedObjects](https://www.nuget.org/packages/Microsoft.SqlServer.SqlManagementObjects) from [Nuget.org](https://nuget.org)

```posh
Install-Package
```

```posh
Install-Module dbalight
# or using Microsoft.PowerShell.PSResourceGet
Install-PSResource dbalight
```

## Usage

WIP

## Module History

This module is one of those driven from the use and being maintainer of dbatools. The dbatools module has its place in where it should be used but in scenarios where you simply want to report or "get" things it is overkill. Those of us that don't want to revert to a bunch of `sqlserver/Invoke-SqlCmd` scripts still want to use SMO (SQL Server Management Objects) because it is cooler.
5 changes: 2 additions & 3 deletions RequiredModules.psd1
Original file line number Diff line number Diff line change
@@ -1,7 +1,6 @@
@{
InvokeBuild = "5.*"
Metadata = "[1.5.7,2.0)"
ModuleBuilder = "1.*"
PackageManagement = "[1.4.8,2.0)"
Pester = "[5.4,6.0)"
platyPS = "[0.14.2,1.0]"
PSScriptAnalyzer = "[1.21,2.0)"
}
43 changes: 0 additions & 43 deletions build.library.ps1

This file was deleted.

Loading

0 comments on commit 6ca5a78

Please sign in to comment.