Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Appearance settings

Feature: Where should the built module go? #31

Copy link
Copy link
@Jaykul

Description

@Jaykul
Issue body actions

As a module author, I need to be able to specify where the build output should go.

Background

Because of how the using module statement works in PowerShell, I usually need to build output into the PSModule path without breaking the working versions -- however, by default the output should go in a folder in the project (let's call it "output" though, because plain English is good, and these aren't binaries).

Assumptions:

I have a source folder

That is, I have a project "root" folder. Within that I have a source folder with the build.psd1 file in it. It may be named "source" but it might also be named with the module name (e.g. "ModuleBuilder") or something else entirely. I might even have multiple modules within a single project. In that case, each one has it's own source folder (which obviously can't all be named "Source").

I sometimes want to add the version number

I can specify the module name in my build.psd1, but not the version, because that changes with each commit/build/release, but sometimes I want to build output into my PSModulePath, so it needs to be able to have the version number, so it doesn't "clean" the old versions out.

When building clean, we should clean this version

If we're adding version numbers to the build output path, we should leave any old version numbers. That way if we're building to the PSModulePath, we won't accidentally remove old versions that I might need for production work, or supporting users.

Proposal

We need a parameter -VersionedOutputDirectory that determines whether a version number is appended to the output folder path or not. This should be a switch that's used in addition to the -OutputDirectory parameter and can be defaulted in the build.psd1.

Possible results:

  1. If you specify -VersionedOutputDirectory and no -OutputDirectory the output should go in a numbered subdirectory of the "root" folder.
  2. If you specify -VersionedOutputDirectory and -OutputDirectory the output should go in a numbered subdirectory of the output directory.
  3. If you specify a relative -OutputDirectory the output should go in a path relative to the build.psd1 (Currently, this is wrong)
Reactions are currently unavailable

Metadata

Metadata

Assignees

No one assigned

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions

      Morty Proxy This is a proxified and sanitized view of the page, visit original site.