Skip to content

Commit

Permalink
Update to 0.2.0
Browse files Browse the repository at this point in the history
  • Loading branch information
mueller-tobias committed Aug 14, 2018
1 parent 47fc894 commit bb9e189
Show file tree
Hide file tree
Showing 3 changed files with 39 additions and 24 deletions.
2 changes: 1 addition & 1 deletion MyFunctions/MyFunctions.psd1
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@

@{
RootModule = 'MyFunctions.psm1'
ModuleVersion = '0.1.0'
ModuleVersion = '0.2.0'
GUID = '9741e3a0-2346-48db-9989-8b6206b72c11'
Author = 'Tobias Mueller'
CompanyName = 'Unknown'
Expand Down
40 changes: 17 additions & 23 deletions MyFunctions/MyFunctions.psm1
Original file line number Diff line number Diff line change
@@ -1,42 +1,36 @@
$script:ModuleRoot = $PSScriptRoot
$script:ModuleVersion = "1.0.0.0"
$script:PSModuleVersion = "0.2.0"

$script:_connectInitialized = $false

# fallback bConnect version
$script:_bConnectFallbackVersion = "v1.0"

# overwrite Invoke-RestMethod timout
$script:_ConnectionTimeout = 0

function Import-ModuleFile
{
<#
<#
.SYNOPSIS
Loads files into the module on module import.
.DESCRIPTION
This helper function is used during module initialization.
It should always be dotsourced itself, in order to proper function.
This provides a central location to react to files being imported, if later desired
.PARAMETER Path
The path to the file to load
.EXAMPLE
PS C:\> . Import-ModuleFile -File $function.FullName
Imports the file stored in $function according to import policy
#>
[CmdletBinding()]
Param (
[string]
$Path
)
if ($doDotSource) { . $Path }
else { $ExecutionContext.InvokeCommand.InvokeScript($false, ([scriptblock]::Create([io.file]::ReadAllText($Path))), $null, $null) }
[CmdletBinding()]
Param (
[string]
$Path
)

if ($doDotSource) { . $Path }
else { $ExecutionContext.InvokeCommand.InvokeScript($false, ([scriptblock]::Create([io.file]::ReadAllText($Path))), $null, $null) }
}

# Detect whether at some level dotsourcing was enforced
Expand All @@ -49,13 +43,13 @@ if ($bConnect_dotsourcemodule) { $script:doDotSource = $true }
# Import all internal functions
foreach ($function in (Get-ChildItem "$ModuleRoot\internal\functions" -Filter "*.ps1" -Recurse -ErrorAction Ignore))
{
. Import-ModuleFile -Path $function.FullName
. Import-ModuleFile -Path $function.FullName
}

# Import all public functions
foreach ($function in (Get-ChildItem "$ModuleRoot\functions" -Filter "*.ps1" -Recurse -ErrorAction Ignore))
{
. Import-ModuleFile -Path $function.FullName
. Import-ModuleFile -Path $function.FullName
}

# Execute Postimport actions
Expand Down
21 changes: 21 additions & 0 deletions docs/CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,21 @@
# Changelog MyFunctions Modul

## 0.2.0 - 14.08.2018

### Added

- Save-PSFConfig
Saves a Module from PSF Configuration into the Powershell Configuration Path.
From the Configuration path the configuration.ps1 of a the modul loads the Configuration Values

- Get-IpMac
Return the IP and MAC Adress for an Computername. Can piped to Get-ImcSwitchPort

- Get-ImcSwitchPort
Queries the IMC API for the Switch and Port where the device is connected.

## 0.1.0 - 13.08.2018

### Added

- Inital Release

0 comments on commit bb9e189

Please sign in to comment.