Skip to content

Commit

Permalink
Adjust structure to exclude no crucial runtime from the package (#15)
Browse files Browse the repository at this point in the history
Follow #12 and #4
  • Loading branch information
kachick authored Mar 18, 2024
1 parent f17d870 commit 23cab14
Show file tree
Hide file tree
Showing 8 changed files with 140 additions and 144 deletions.
5 changes: 3 additions & 2 deletions .github/workflows/release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@ jobs:
id: meta
run: |
Get-PSRepository
Write-Output "version=$((Import-PowerShellDataFile ./PSFzfHistory.psd1).ModuleVersion)" | Tee-Object -Append -FilePath ${env:GITHUB_OUTPUT}
Write-Output "version=$((Import-PowerShellDataFile ./PSFzfHistory/PSFzfHistory.psd1).ModuleVersion)" | Tee-Object -Append -FilePath ${env:GITHUB_OUTPUT}
- name: Wait other jobs
uses: kachick/[email protected]
timeout-minutes: 30
Expand Down Expand Up @@ -52,5 +52,6 @@ jobs:
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
run: |
# TODO: Upload zipped *.ps* files as the assets
Copy-Item -Path .\README.md .\LICENSE -Destination .\PSFzfHistory
# TODO: Upload zipped PSFzfHistory files as the assets
gh release create 'v${{ needs.gallery.outputs.version }}' --generate-notes
138 changes: 0 additions & 138 deletions PSFzfHistory.psd1

This file was deleted.

133 changes: 133 additions & 0 deletions PSFzfHistory/PSFzfHistory.psd1
Original file line number Diff line number Diff line change
@@ -0,0 +1,133 @@
#
# Module manifest for module 'PSFzfHistory'
#
# Generated by: Kenichi Kamiya
#
# Generated on: 3/3/2024
#

@{

# Script module or binary module file associated with this manifest.
RootModule = 'PSFzfHistory.psm1'

# Version number of this module.
ModuleVersion = '0.0.4'

# Supported PSEditions
# CompatiblePSEditions = @()

# ID used to uniquely identify this module
GUID = '13b2772e-89a1-43f0-93a2-373d4c4c1c62'

# Author of this module
Author = 'Kenichi Kamiya'

# Company or vendor of this module
CompanyName = 'Unknown'

# Copyright statement for this module
Copyright = '(c) Kenichi Kamiya. All rights reserved.'

# Description of the functionality provided by this module
Description = 'fzf history integration with small code'

# Minimum version of the PowerShell engine required by this module
# Adjust with bundled PSReadLine
PowerShellVersion = '5.1'

# Name of the PowerShell host required by this module
# PowerShellHostName = ''

# Minimum version of the PowerShell host required by this module
# PowerShellHostVersion = ''

# Minimum version of Microsoft .NET Framework required by this module. This prerequisite is valid for the PowerShell Desktop edition only.
# DotNetFrameworkVersion = ''

# Minimum version of the common language runtime (CLR) required by this module. This prerequisite is valid for the PowerShell Desktop edition only.
# ClrVersion = ''

# Processor architecture (None, X86, Amd64) required by this module
# ProcessorArchitecture = ''

# Modules that must be imported into the global environment prior to importing this module
# RequiredModules = @()

# Assemblies that must be loaded prior to importing this module
# RequiredAssemblies = @()

# Script files (.ps1) that are run in the caller's environment prior to importing this module.
# ScriptsToProcess = @()

# Type files (.ps1xml) to be loaded when importing this module
# TypesToProcess = @()

# Format files (.ps1xml) to be loaded when importing this module
# FormatsToProcess = @()

# Modules to import as nested modules of the module specified in RootModule/ModuleToProcess
# NestedModules = @('PSFzfHistory.psm1')

# Functions to export from this module, for best performance, do not use wildcards and do not delete the entry, use an empty array if there are no functions to export.
FunctionsToExport = @('Invoke-FzfHistory', 'Set-FzfHistoryKeybind')

# Cmdlets to export from this module, for best performance, do not use wildcards and do not delete the entry, use an empty array if there are no cmdlets to export.
CmdletsToExport = @()

# Variables to export from this module
VariablesToExport = '*'

# Aliases to export from this module, for best performance, do not use wildcards and do not delete the entry, use an empty array if there are no aliases to export.
AliasesToExport = @()

# DSC resources to export from this module
# DscResourcesToExport = @()

# List of all modules packaged with this module
# ModuleList = @()

# List of all files packaged with this module
# FileList = @()

# Private data to pass to the module specified in RootModule/ModuleToProcess. This may also contain a PSData hashtable with additional module metadata used by PowerShell.
PrivateData = @{

PSData = @{

# Tags applied to this module. These help with module discovery in online galleries.
Tags = @('history', 'fzf')

# A URL to the license for this module.
LicenseUri = 'https://github.com/kachick/PSFzfHistory/blob/main/LICENSE'

# A URL to the main website for this project.
ProjectUri = 'https://github.com/kachick/PSFzfHistory'

# A URL to an icon representing this module.
# IconUri = ''

# ReleaseNotes of this module
# ReleaseNotes = ''

# Prerelease string of this module
# Prerelease = ''

# Flag to indicate whether the module requires explicit user acceptance for install/update/save
# RequireLicenseAcceptance = $false

# External dependent modules of this module
# ExternalModuleDependencies = @()

} # End of PSData hashtable

} # End of PrivateData hashtable

# HelpInfo URI of this module
# HelpInfoURI = ''

# Default prefix for commands exported from this module. Override the default prefix using Import-Module -Prefix.
# DefaultCommandPrefix = ''

}

File renamed without changes.
2 changes: 1 addition & 1 deletion Taskfile.yml
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@ tasks:
# pwsh exit with 0 even if ReadLine made errors, the 1+ code is special for an example as parser error
# So returns 1+ with the result by yourself in each cmd
- pwsh --File ./tools/test-all.ps1
- pwsh --Command 'Test-ModuleManifest -Path *.psd1'
- pwsh --Command 'Test-ModuleManifest -Path ./PSFzfHistory/*.psd1'
fmt:
cmds:
- dprint fmt
Expand Down
2 changes: 1 addition & 1 deletion tests/PSFzfHistory.Tests.ps1
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
Import-Module -Name .\src\PSFzfHistory.psm1
Import-Module -Name .\PSFzfHistory\PSFzfHistory.psm1

InModuleScope PSFzfHistory {
Describe 'AsOrderedSet' {
Expand Down
2 changes: 1 addition & 1 deletion tools/lint-fix.ps1
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
# Do NOT use 'Invoke-ScriptAnalyzer -Recurse -Path .' It includes dotfiles as .direnv
# https://github.com/PowerShell/PSScriptAnalyzer/issues/561
Get-ChildItem -Recurse -Path src -Include "*.ps*1" |
Get-ChildItem -Recurse -Path PSFzfHistory -Include "*.ps*1" |
ForEach-Object {
Write-Output $_.FullName
Invoke-ScriptAnalyzer -Recurse -ReportSummary -EnableExit -Settings CodeFormatting -Fix -Path $_.FullName
Expand Down
2 changes: 1 addition & 1 deletion tools/repl.ps1
Original file line number Diff line number Diff line change
@@ -1 +1 @@
Import-Module -Name .\src\PSFzfHistory.psm1
Import-Module -Name .\PSFzfHistory\PSFzfHistory.psm1

0 comments on commit 23cab14

Please sign in to comment.