Skip to content

Commit a789885

Browse files
author
sgkens
committed
👷 ci(build): updating gitlab ci/cd
🧰 Build:
1 parent 3003794 commit a789885

File tree

3 files changed

+59
-18
lines changed

3 files changed

+59
-18
lines changed

build/bt2-ci-create-packages.ps1

Lines changed: 57 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -7,22 +7,63 @@ $ModuleManifest = Test-ModuleManifest -path .\dist\$modulename\$modulename.psd1
77

88
#----Special Config Choco --------------------------------
99
# Choco supports markdown nuget and psgallary done
10-
$Additional_descriptions = @"
11-
*CommitFusion* is a PowerShell module crafted to streamline the creation of well-organized and uniform commit messages in adherence to the [🧷Conventional Commits specification](https://www.onventionalcommits.org/en/v1.0.0/) for your `git` repository.
12-
13-
A custom version of the [🧷carloscuesta gitmojis Schema](https://github.com/carloscuesta/gitmoji/blob/master/packages/gitmojis/src/gitmojis.json) (accessible at [🧷gitmoji.dev](https://gitmoji.dev)) is used to define the emojis, scope, and default description of the commit string.
10+
$Additional_descriptions = @'
11+
***CommitFusion*** is a **PowerShell** module designed to streamline the process of generating *Conventional Commits Messages* in `git`. Commit messages are constructed using the [🧷Conventional Commits specification](https://www.conventionalcommits.org/en/v1.0.0/) standard, and uses [🧷gitmojis Schema](https://github.com/carloscuesta/gitmoji/blob/master/packages/gitmojis/src/gitmojis.json) see [🧷gitmoji.dev](https://gitmoji.dev), The module allows the construction of a custimized commit message with a number of options.
1412
1513
### Features
1614
17-
- Conventional Commit specification.
18-
- Custom commit Types.
19-
- Customizable Commit Messages.
20-
- Changelog auto-updater.
21-
- Semver(*Semantic Versioning specification*).
22-
- Emoji parser.
23-
- Gitmoji parser.
24-
- Auto Commit
25-
"@
15+
🪶 Conventional Commits Standard
16+
🪶 Customizable Commit Message
17+
🪶 Semver Versioning Generator
18+
🪶 Changelog Auto-update with Markdown Auto-format
19+
🪶 Gitmoji Custom Schema
20+
21+
## 🎾 Using Commitfusion
22+
23+
Retrive list of available commit types
24+
25+
``````powershell
26+
Get-CommitTypes
27+
``````
28+
29+
Retrive list of available commit types.
30+
31+
``````powershell
32+
Get-CommitTypes -Semver patch
33+
Get-CommitTypes -Semver minor
34+
Get-CommitTypes -Semver major
35+
Get-CommitTypes -Semver nosemver
36+
``````
37+
38+
Creating a new feature` commit.
39+
40+
``````powershell
41+
# Default Returns ]string]
42+
``````
43+
44+
Assuming you have staged files, you can use the following to commit the changes:
45+
46+
``````powershell
47+
# Apply Commit
48+
New-Commit @params | Set-Commit -Confirm
49+
# Apply Commit and write to changelog file
50+
New-Commit @params | Format-FusionMD | Update-Changelog -logfile path\to\file | Set-Commit -Confirm
51+
``````
52+
53+
Generate Semver version base on you commits
54+
55+
``````powershell
56+
# generate SemVer Version returns psobject
57+
Get-GitAutoVersion | select version
58+
# only string
59+
(Get-GitAutoVersion).Version
60+
``````
61+
62+
### Default avaliable commit types
63+
64+
> Types are found at $moduleroot/libs/commitfusion.types.json
65+
'@
66+
2667
#----Special Config Choco --------------------------------
2768
$NuSpecParams = @{
2869
path=".\dist\$ModuleName"
@@ -31,6 +72,7 @@ $NuSpecParams = @{
3172
Author = $ModuleManifest.Author
3273
Description = "$($ModuleManifest.Description)"
3374
ProjectUrl = $ModuleManifest.PrivateData.PSData.ProjectUri
75+
IconUrl = 'https://raw.githubusercontent.com/sgkens/resources/main/modules/CommitFusion/dist/v2/commitfusion-icon-x128.png'
3476
License = "MIT"
3577
company = $ModuleManifest.CompanyName
3678
Tags = $ModuleManifest.Tags
@@ -42,8 +84,9 @@ $NuSpecParamsChoco = @{
4284
ModuleName = $ModuleName
4385
ModuleVersion = $ModuleManifest.Version -replace "\.\d+$",""
4486
Author = $ModuleManifest.Author
45-
Description = "$($ModuleManifest.Description)"
87+
Description = "$($ModuleManifest.Description) `n`n $Additional_descriptions"
4688
ProjectUrl = $ModuleManifest.PrivateData.PSData.ProjectUri
89+
IconUrl = 'https://raw.githubusercontent.com/sgkens/resources/main/modules/CommitFusion/dist/v2/commitfusion-icon-x128.png'
4790
License = "MIT"
4891
company = $ModuleManifest.CompanyName
4992
Tags = $ModuleManifest.Tags

build/bt5-ci-deploy-pushtochoco.ps1

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -10,8 +10,7 @@ $SemVerVersion = $ModuleManifest.Version -replace "\.\d+$",""
1010
if(Get-command choco.exe){
1111
write-host "Chocolatey is installed, skipping install"
1212
write-host "Pushing to chocolatey https://community.chocolatey.org/"
13-
choco apikey --key $CHOCO_API_KEY --source https://push.chocolatey.org/
14-
choco.exe push .\dist\$ModuleName.$SemVerVersion.nupkg --source 'https://community.chocolatey.org/'
13+
choco push .\dist\choco\$($ModuleManifest.CompanyName).$ModuleName.$SemVerVersion.nupkg --source 'https://community.chocolatey.org/' --api-key $CHOCO_API_KEY --source https://push.chocolatey.org/
1514
write-host "Pushed to chocolatey - Complete"
1615
}else{
1716
write-host "Chocolatey is not installed, please install chocolatey https://community.chocolatey.org/"

build/bt6-ci-deploy-psgallary.ps1

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -5,11 +5,10 @@ $ModuleManifest = Test-ModuleManifest -path ".\dist\$ModuleName\$ModuleName`.psd
55

66
#---CONFIG----------------------------
77

8-
98
#------------------------------------
109
publish-Module `
1110
-path ".\dist\$modulename" `
12-
-Repository 'psgallary' `
11+
-Repository 'psgallery' `
1312
-NuGetApiKey $PSGAL_API_KEY `
1413
-projecturi $ModuleManifest.ProjectUri `
1514
-licenseuri $ModuleManifest.LicenseUri `

0 commit comments

Comments
 (0)