Skip to content

Commit ae5c9e4

Browse files
Update index.md to link to PowerShell Modules documentation and remove redundant details
1 parent b8bed81 commit ae5c9e4

2 files changed

Lines changed: 40 additions & 38 deletions

File tree

docs/PowerShell/Modules/index.md

Lines changed: 39 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -8,6 +8,45 @@ PSModule modules are reusable PowerShell libraries published to the PowerShell G
88
- **[Test Specification](Test-Specification.md)** — How we write Pester tests: structure, hierarchy, and naming conventions.
99
- **[Versioning](Versioning.md)** — How changes to the public interface determine the SemVer version bump.
1010

11+
## Getting started
12+
13+
<details>
14+
<summary>About</summary>
15+
16+
A PowerShell module is a set of functions, scripts, and cmdlets that are bundled together in a single package. Modules are used to organize and distribute code in a way that is easy to use and share. They can be used to extend the functionality of PowerShell, automate tasks, and create reusable code that can be shared with others.
17+
We have created a framework that automates the process of creating, testing, and publishing PowerShell modules to the PowerShell Gallery. This framework is designed to make it easy for developers to create and share their PowerShell modules with the community.
18+
19+
</details>
20+
21+
<details>
22+
<summary>How we do it in PSModule</summary>
23+
24+
Projects based on the `Template-PSModule` repository template will automatically have the necessary workflows and configurations set up to automate the process of creating, testing, and publishing PowerShell modules to the PowerShell Gallery. This includes workflows for building, testing, and releasing the module, as well as a configuration file for setting up the module's metadata and dependencies.
25+
Using custom properties we set `RepoType` to `Module`.
26+
We use branch policies to control the flow of changes to the `main` branch, and we use labels to control the versioning of the module when a pull request is merged.
27+
28+
</details>
29+
30+
<details>
31+
<summary>Create a new project</summary>
32+
33+
1. [Create a repository based on the template Template-PSModule](https://github.com/new?template_name=Template-PSModule&template_owner=PSModule). The module will by default use the name of the repository. See [Process-PSModule](https://github.com/PSModule/Process-PSModule) for more info on choosing another name than the repository name.
34+
1. Create a repository or organization secret called `APIKEY` holding the API key for the PowerShell Gallery.
35+
1. Configure the settings you want for the repository including a branch policy for the `main` branch.
36+
1. On a topic branch:
37+
1. develop the code you want to add to your module.
38+
1. delete the parts you do not need.
39+
1. update the tests in the `tests` folder.
40+
1. Create a PR. Add a label to the PR depending on what you want to do.
41+
- `Major` - Will create a major release (vX.0.0) when merged. If specified with "Prerelease", a major version will be created using the prerelease tag (vX.0.0-\<branchName\>).
42+
- `Minor` - Will create a minor release (vX.Y.0) when merged. If specified with "Prerelease", a minor version will be created using the prerelease tag (vX.Y.0-\<branchName\>).
43+
- `Patch` - Will create a minor release (vX.Y.Z) when merged. If specified with "Prerelease", a minor version will be created using the prerelease tag (vX.Y.Z-\<branchName\>). A patch version bump is the default if nothing is specified for the PR.
44+
- `Prerelease` - CI will create a prerelease of the module using the branch name as a prerelease tag in the version. This will create both a repository release and a prerelease version of the module on the PowerShell Gallery.
45+
1. Once the PR is created, the [Process-PSModule](https://github.com/PSModule/Process-PSModule) workflow will trigger.
46+
1. When the PR is merged, a release will be created and the module will be published to the PowerShell Gallery with a stable version based on the version bump indicator the PR was was labeled with. Prerelease tags will be cleaned up on the repository.
47+
48+
</details>
49+
1150
## Modules on the PowerShell Gallery
1251

1352
<!-- MODULE_LIST_START -->

docs/index.md

Lines changed: 1 addition & 38 deletions
Original file line numberDiff line numberDiff line change
@@ -37,44 +37,7 @@ as our primary toolstack. We concentrate on the following key areas:
3737

3838
### PowerShell modules
3939

40-
<details>
41-
<summary>About</summary>
42-
43-
A PowerShell module is a set of functions, scripts, and cmdlets that are bundled together in a single package. Modules are used to organize and distribute code in a way that is easy to use and share. They can be used to extend the functionality of PowerShell, automate tasks, and create reusable code that can be shared with others.
44-
We have created a framework that automates the process of creating, testing, and publishing PowerShell modules to the PowerShell Gallery. This framework is designed to make it easy for developers to create and share their PowerShell modules with the community.
45-
46-
</details>
47-
48-
<details>
49-
<summary>How we do it in PSModule</summary>
50-
51-
Projects based on the `Template-PSModule` repository template will automatically have the necessary workflows and configurations set up to automate the process of creating, testing, and publishing PowerShell modules to the PowerShell Gallery. This includes workflows for building, testing, and releasing the module, as well as a configuration file for setting up the module's metadata and dependencies.
52-
Using custom properties we set `RepoType` to `Module`.
53-
We use branch policies to control the flow of changes to the `main` branch, and we use labels to control the versioning of the module when a pull request is merged.
54-
55-
</details>
56-
57-
<details>
58-
<summary>Create a new project</summary>
59-
60-
1. [Create a repository based on the template Template-PSModule](https://github.com/new?template_name=Template-PSModule&template_owner=PSModule). The module will by default use the name of the repository. See [Process-PSModule](https://github.com/PSModule/Process-PSModule) for more info on choosing another name than the repository name.
61-
1. Create a repository or organization secret called `APIKEY` holding the API key for the PowerShell Gallery.
62-
1. Configure the settings you want for the repository including a branch policy for the `main` branch.
63-
1. On a topic branch:
64-
1. develop the code you want to add to your module.
65-
1. delete the parts you do not need.
66-
1. update the tests in the `tests` folder.
67-
1. Create a PR. Add a label to the PR depending on what you want to do.
68-
- `Major` - Will create a major release (vX.0.0) when merged. If specified with "Prerelease", a major version will be created using the prerelease tag (vX.0.0-\<branchName\>).
69-
- `Minor` - Will create a minor release (vX.Y.0) when merged. If specified with "Prerelease", a minor version will be created using the prerelease tag (vX.Y.0-\<branchName\>).
70-
- `Patch` - Will create a minor release (vX.Y.Z) when merged. If specified with "Prerelease", a minor version will be created using the prerelease tag (vX.Y.Z-\<branchName\>). A patch version bump is the default if nothing is specified for the PR.
71-
- `Prerelease` - CI will create a prerelease of the module using the branch name as a prerelease tag in the version. This will create both a repository release and a prerelease version of the module on the PowerShell Gallery.
72-
1. Once the PR is created, the [Process-PSModule](https://github.com/PSModule/Process-PSModule) workflow will trigger.
73-
1. When the PR is merged, a release will be created and the module will be published to the PowerShell Gallery with a stable version based on the version bump indicator the PR was was labeled with. Prerelease tags will be cleaned up on the repository.
74-
75-
</details>
76-
77-
See [Modules on the PowerShell Gallery](PowerShell/Modules/index.md).
40+
See **[PowerShell Modules](PowerShell/Modules/index.md)** for documentation, including how to create a new project and the modules we publish to the PowerShell Gallery.
7841

7942
### PowerShell based Azure Function Apps
8043

0 commit comments

Comments
 (0)