@halospv3/hce.shared-config 2.1.2 → 2.2.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/CHANGELOG.md +22 -0
- package/README.md +39 -11
- package/dotnet/GitVersion.yml +1 -0
- package/dotnet/GitVersion6.0.yml +6 -0
- package/dotnet/ZipPublishDir.targets +65 -13
- package/package.json +6 -16
package/CHANGELOG.md
CHANGED
|
@@ -1,3 +1,25 @@
|
|
|
1
|
+
## [2.2.1](https://github.com/halospv3/hce.shared/compare/v2.2.0...v2.2.1) (2024-03-29)
|
|
2
|
+
|
|
3
|
+
|
|
4
|
+
### Bug Fixes
|
|
5
|
+
|
|
6
|
+
* include commitlint config in package files ([26e2888](https://github.com/halospv3/hce.shared/commit/26e2888bdde302d7dd7a88b763975598a1eb539f))
|
|
7
|
+
|
|
8
|
+
## [2.2.0](https://github.com/halospv3/hce.shared/compare/v2.1.2...v2.2.0) (2024-03-29)
|
|
9
|
+
|
|
10
|
+
|
|
11
|
+
### Features
|
|
12
|
+
|
|
13
|
+
* **dotnet:** add GitVersion 6.0 config ([3784c72](https://github.com/halospv3/hce.shared/commit/3784c72ea2e37dcced13ccc322476f0d93d2bd9b))
|
|
14
|
+
* **dotnet:** add global "RepoRoot", "RepoRootPublishDir", and placeholder properties ([23d330a](https://github.com/halospv3/hce.shared/commit/23d330a2ca4769fcd14fe8f1a409f6801a7a1ea3))
|
|
15
|
+
* **dotnet:** rework ZipPublishDir ([618ba95](https://github.com/halospv3/hce.shared/commit/618ba95b3d731dc1b560e91757aa02e947b09e03))
|
|
16
|
+
* move commitlint config to shared file ([66efb30](https://github.com/halospv3/hce.shared/commit/66efb30a9e4351d02a761edf3a49722bc8a0f111))
|
|
17
|
+
|
|
18
|
+
|
|
19
|
+
### Bug Fixes
|
|
20
|
+
|
|
21
|
+
* **dotnet:** trim variant args; undefine if parentheses would be empty ([10414ff](https://github.com/halospv3/hce.shared/commit/10414ffc58950bae4d582d2263cbf9d7a51235eb)), closes [#356](https://github.com/halospv3/hce.shared/issues/356)
|
|
22
|
+
|
|
1
23
|
## [2.1.2](https://github.com/halospv3/hce.shared/compare/v2.1.1...v2.1.2) (2024-03-26)
|
|
2
24
|
|
|
3
25
|
|
package/README.md
CHANGED
|
@@ -15,6 +15,17 @@ npm install --save-dev @halospv3/hce.shared-config
|
|
|
15
15
|
|
|
16
16
|
### 2. Customize Semantic Release
|
|
17
17
|
|
|
18
|
+
```json
|
|
19
|
+
// package.json
|
|
20
|
+
{
|
|
21
|
+
"release": {
|
|
22
|
+
"extends": [
|
|
23
|
+
"@halospv3/hce.shared-config"
|
|
24
|
+
]
|
|
25
|
+
}
|
|
26
|
+
}
|
|
27
|
+
```
|
|
28
|
+
|
|
18
29
|
WARNING! Defining a property will *overwrite* the previous value. Arrays and objects are *not* merged. You can...
|
|
19
30
|
- Assign to top-level variables to avoid modifying the plugins array.
|
|
20
31
|
- Write your config in CJS and manually merge objects and arrays.
|
|
@@ -46,19 +57,11 @@ WARNING! Defining a property will *overwrite* the previous value. Arrays and obj
|
|
|
46
57
|
|
|
47
58
|
```json
|
|
48
59
|
// package.json
|
|
49
|
-
// body-max-line-length is now a Warning instead of an Error.
|
|
50
60
|
{
|
|
51
61
|
"commitlint": {
|
|
52
62
|
"extends": [
|
|
53
|
-
"
|
|
54
|
-
]
|
|
55
|
-
"rules": {
|
|
56
|
-
"body-max-line-length": [
|
|
57
|
-
1,
|
|
58
|
-
"always",
|
|
59
|
-
100
|
|
60
|
-
]
|
|
61
|
-
}
|
|
63
|
+
"./node_modules/@halospv3/hce.shared-config/commitlint.config.ts"
|
|
64
|
+
]
|
|
62
65
|
}
|
|
63
66
|
}
|
|
64
67
|
```
|
|
@@ -70,10 +73,35 @@ npx husky add .husky/commit-msg 'npx --no -- commitlint --edit ${1}'
|
|
|
70
73
|
|
|
71
74
|
### 4. (dotnet) Add/Edit Directory.Build.props
|
|
72
75
|
|
|
76
|
+
|
|
77
|
+
> Example Directory.Build.props from [BinToss/GroupBox.Avalonia](https://github.com/BinToss/GroupBox.Avalonia)
|
|
78
|
+
|
|
79
|
+
```xml
|
|
80
|
+
<Project>
|
|
81
|
+
<PropertyGroup>
|
|
82
|
+
<RepoRoot Condition="'$(RepoRoot)' == ''">$([MSBuild]::GetDirectoryNameOfFileAbove($(MSBuildThisFileDirectory), '.git/index'))</RepoRoot>
|
|
83
|
+
<HCESharedDir Condition="'$(HCESharedDir)' == ''">$(RepoRoot)node_modules/@halospv3/hce.shared-config/</HCESharedDir>
|
|
84
|
+
<GitVersion_Path Condition="'$(GitVersion_Path)' == ''">$(HCESharedDir)GitVersion.yml</GitVersion_Path>
|
|
85
|
+
<AvaloniaVersion>11.0.10</AvaloniaVersion>
|
|
86
|
+
</PropertyGroup>
|
|
87
|
+
|
|
88
|
+
<PropertyGroup Condition="'$(CI)' == 'true'">
|
|
89
|
+
<Configuration>Release</Configuration>
|
|
90
|
+
<ContinuousIntegrationBuild>true</ContinuousIntegrationBuild>
|
|
91
|
+
<Deterministic>true</Deterministic>
|
|
92
|
+
</PropertyGroup>
|
|
93
|
+
|
|
94
|
+
<Import Project="$(HCESharedDir)/dotnet/ZipPublishDir.targets" />
|
|
95
|
+
</Project>
|
|
96
|
+
```
|
|
97
|
+
|
|
98
|
+
----
|
|
99
|
+
|
|
73
100
|
Add the file `Directory.Build.props` to your repository's root directory or solution directory if you haven't already.
|
|
74
101
|
Then, add the following properties:
|
|
75
102
|
```xml
|
|
76
|
-
<Project>
|
|
103
|
+
<Project> <!-- Minimal requirements for dotnet/msbuild integration -->
|
|
104
|
+
<Import Project="./node_modules/@halospv3/hce.shared-config/dotnet/ZipPublishDir.targets" />
|
|
77
105
|
<PropertyGroup>
|
|
78
106
|
<ProjectRootDir>$([MSBuild]::GetDirectoryNameOfFileAbove($(MSBuildThisFileDirectory), '.git/index'))</ProjectRootDir>
|
|
79
107
|
<HCESharedDir>$(ProjectRootDir)/node_modules/@halospv3/hce.shared-config/</HCESharedDir>
|
package/dotnet/GitVersion.yml
CHANGED
|
@@ -1,3 +1,4 @@
|
|
|
1
|
+
# yaml-language-server: $schema=https://raw.githubusercontent.com/GitTools/GitVersion/main/schemas/5.12/GitVersion.configuration.json
|
|
1
2
|
# https://gitversion.net/docs/reference/configuration
|
|
2
3
|
mode: Mainline
|
|
3
4
|
major-version-bump-message: "^(build|chore|ci|docs|feat|fix|perf|refactor|revert|style|test)(\\([\\w\\s-]*\\))?(!:|:.*\\n\\n((.+\\n)+\\n)?BREAKING CHANGE:\\s.+)"
|
|
@@ -0,0 +1,6 @@
|
|
|
1
|
+
# yaml-language-server: $schema=https://raw.githubusercontent.com/GitTools/GitVersion/main/schemas/6.0/GitVersion.configuration.json
|
|
2
|
+
# https://gitversion.net/docs/reference/configuration
|
|
3
|
+
workflow: TrunkBased/v1
|
|
4
|
+
major-version-bump-message: "^(build|chore|ci|docs|feat|fix|perf|refactor|revert|style|test)(\\([\\w\\s-]*\\))?(!:|:.*\\n\\n((.+\\n)+\\n)?BREAKING CHANGE:\\s.+)"
|
|
5
|
+
minor-version-bump-message: "^(feat)(\\([\\w\\s-]*\\))?:"
|
|
6
|
+
patch-version-bump-message: "^(build|chore|ci|docs|fix|perf|refactor|revert|style|test)(\\([\\w\\s-]*\\))?:"
|
|
@@ -1,23 +1,75 @@
|
|
|
1
1
|
<Project>
|
|
2
|
-
|
|
3
|
-
|
|
2
|
+
<Target Name="ZipPublishDir" AfterTargets="Publish"
|
|
3
|
+
Outputs="$(DestinationFile)">
|
|
4
4
|
<PropertyGroup>
|
|
5
|
-
<!--
|
|
6
|
-
|
|
7
|
-
<RepoRoot>$([
|
|
8
|
-
|
|
9
|
-
<!--
|
|
10
|
-
|
|
5
|
+
<!-- Required Parameters -->
|
|
6
|
+
<RepoRoot Condition="'$(RepoRoot)' == '' And '$(ProjectRootDir)' != ''">$(ProjectRootDir)</RepoRoot>
|
|
7
|
+
<RepoRoot Condition="'$(RepoRoot)' == ''">$([MSBuild]::GetDirectoryNameOfFileAbove($(MSBuildThisFileDirectory), '.git/index'))</RepoRoot>
|
|
8
|
+
|
|
9
|
+
<!-- Optional Parameters
|
|
10
|
+
- AssemblyName
|
|
11
|
+
- Version
|
|
12
|
+
- VariantArgs (default: Configuration;TargetFramework;RuntimeIdentifier)
|
|
13
|
+
- Configuration
|
|
14
|
+
- TargetFramework
|
|
15
|
+
- RuntimeIdentifier
|
|
16
|
+
-->
|
|
17
|
+
<AppendVariantArgs Condition="'$(AppendVariantArgs)' == ''">true</AppendVariantArgs>
|
|
18
|
+
|
|
19
|
+
<appendVarArgs>$(AppendVariantArgs)</appendVarArgs>
|
|
20
|
+
<repoRootPublishDir>$(RepoRoot)/publish</repoRootPublishDir>
|
|
11
21
|
|
|
12
|
-
<!--
|
|
13
|
-
<
|
|
22
|
+
<!-- Only add Configuration when Debug -->
|
|
23
|
+
<dbgCfg Condition="'$(Configuration)' == 'Debug'">$(Configuration)</dbgCfg>
|
|
24
|
+
<!-- "net6.0 win7-x86"
|
|
25
|
+
"Debug net6.0 win7-x86" -->
|
|
26
|
+
<spaceArgs Condition="'$(VariantArgs)' != ''">$(VariantArgs.Replace(";"," ").Trim())</spaceArgs>
|
|
27
|
+
<spaceArgs Condition="'$(spaceArgs)' == ''">$([System.String]::Join(' ',$(dbgCfg), $(TargetFramework), $(RuntimeIdentifier)).Trim())</spaceArgs>
|
|
28
|
+
<!-- " (Debug net6.0 win7-x86)"
|
|
29
|
+
" (net6.0 win7-x86)"
|
|
30
|
+
"" -->
|
|
31
|
+
<enclosedVArgs Condition="$(appendVarArgs) And '$(spaceArgs)' != ''"> ($(spaceArgs))</enclosedVArgs>
|
|
32
|
+
<!-- " 1.2.3-preview.4"
|
|
33
|
+
"" -->
|
|
34
|
+
<version Condition="'$(Version)' != ''"> $(Version)</version>
|
|
35
|
+
<!-- "C:\Repos\HaloSPV3\HXE\publish\HXE 1.2.3-preview.4 (net6.0 win7-x86).zip" -->
|
|
36
|
+
<DestinationFile>$(repoRootPublishDir)/$(AssemblyName)$(version)$(enclosedVArgs).zip</DestinationFile>
|
|
37
|
+
<!-- todo: look into .NET 8 SDK's Artifacts feature -->
|
|
14
38
|
</PropertyGroup>
|
|
15
39
|
|
|
16
|
-
<MakeDir Directories="$(
|
|
17
|
-
|
|
40
|
+
<MakeDir Condition="!Exists('$(repoRootPublishDir)')" Directories="$(repoRootPublishDir)"/>
|
|
18
41
|
<ZipDirectory
|
|
19
42
|
SourceDirectory="$(PublishDir)"
|
|
20
|
-
DestinationFile="$(
|
|
43
|
+
DestinationFile="$(DestinationFile)"
|
|
21
44
|
Overwrite="true" />
|
|
45
|
+
|
|
46
|
+
<Message Text="Publish assets zipped to '$(DestinationFile)'." Importance="high"/>
|
|
22
47
|
</Target>
|
|
48
|
+
|
|
49
|
+
<!-- placeholder values for HCE.Shared ONLY -->
|
|
50
|
+
<PropertyGroup Condition="$([System.String]::Copy($(MSBuildProjectDirectory)).ToLowerInvariant().Contains('hce.shared'))">
|
|
51
|
+
<Configuration>Release</Configuration>
|
|
52
|
+
<TargetFramework>net6.0</TargetFramework>
|
|
53
|
+
<RuntimeIdentifier>win7-x86</RuntimeIdentifier>
|
|
54
|
+
<RuntimeIdentifiers>;;;win7-x86;win7-x64;;;</RuntimeIdentifiers>
|
|
55
|
+
<ZipPublishDir_AppendVariantArgs>true</ZipPublishDir_AppendVariantArgs>
|
|
56
|
+
<!-- <VariantArgs>$(MSBuildProjectName);$(Configuration)</VariantArgs> -->
|
|
57
|
+
|
|
58
|
+
<!-- -->
|
|
59
|
+
|
|
60
|
+
<appendVarArgs>$(ZipPublishDir_AppendVariantArgs)</appendVarArgs>
|
|
61
|
+
<dbgCfg Condition="'$(Configuration)' == 'Debug'">$(Configuration)</dbgCfg>
|
|
62
|
+
<!-- "net6.0 win7-x86" -->
|
|
63
|
+
<spaceArgs Condition="'$(VariantArgs)' != ''">$(VariantArgs.Replace(";"," ").Trim())</spaceArgs>
|
|
64
|
+
<spaceArgs Condition="'$(spaceArgs)' == ''">$([System.String]::Join(' ',$(dbgCfg), $(TargetFramework), $(RuntimeIdentifier)).Trim())</spaceArgs>
|
|
65
|
+
<!-- " (net6.0 win7-x86)" -->
|
|
66
|
+
<enclosedVArgs Condition="$(appendVarArgs) And '$(spaceArgs)' != ''"> ($(spaceArgs))</enclosedVArgs>
|
|
67
|
+
<!-- "win7-x86 win7-x64" -->
|
|
68
|
+
<spaceSeparatedRIDs Condition="$(RuntimeIdentifiers) != ''">$(RuntimeIdentifiers.ToString().Replace(";"," ").Trim())</spaceSeparatedRIDs>
|
|
69
|
+
<!-- " (win7-x86 win7-x64)" -->
|
|
70
|
+
<enclosedRIDs Condition="$(appendVarArgs) And '$(spaceSeparatedRIDs)' != ''"> ($(spaceSeparatedRIDs))</enclosedRIDs>
|
|
71
|
+
<Version>1.0.0</Version>
|
|
72
|
+
<version Condition="'$(Version)' != ''"> $(Version)</version>
|
|
73
|
+
|
|
74
|
+
</PropertyGroup>
|
|
23
75
|
</Project>
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@halospv3/hce.shared-config",
|
|
3
|
-
"version": "2.1
|
|
3
|
+
"version": "2.2.1",
|
|
4
4
|
"description": "Automate commit message quality, changelogs, and CI/CD releases. Exports a semantic-release shareable configuration deserialized from this package's '.releaserc.yml'. Shared resources for .NET projects are also distributed with this package.",
|
|
5
5
|
"keywords": [
|
|
6
6
|
"halo",
|
|
@@ -17,6 +17,7 @@
|
|
|
17
17
|
"!tests/",
|
|
18
18
|
"CHANGELOG.md",
|
|
19
19
|
"cjs/**/*",
|
|
20
|
+
"commitlint.config.js",
|
|
20
21
|
"dotnet/",
|
|
21
22
|
"src/**/*",
|
|
22
23
|
"static/**/*"
|
|
@@ -41,8 +42,9 @@
|
|
|
41
42
|
"watch": "packemon watch"
|
|
42
43
|
},
|
|
43
44
|
"dependencies": {
|
|
44
|
-
"@commitlint/cli": "^19.2.
|
|
45
|
+
"@commitlint/cli": "^19.2.1",
|
|
45
46
|
"@commitlint/config-conventional": "^19.1.0",
|
|
47
|
+
"@commitlint/types": "^19.0.3",
|
|
46
48
|
"@semantic-release/changelog": "^6.0.3",
|
|
47
49
|
"@semantic-release/commit-analyzer": "^12.0.0",
|
|
48
50
|
"@semantic-release/exec": "^6.0.3",
|
|
@@ -60,7 +62,7 @@
|
|
|
60
62
|
"devDependencies": {
|
|
61
63
|
"@babel/cli": "^7.23.9",
|
|
62
64
|
"@halospv3/hce.shared-config": "./",
|
|
63
|
-
"@tsconfig/node-lts": "^20.1.
|
|
65
|
+
"@tsconfig/node-lts": "^20.1.2",
|
|
64
66
|
"@types/debug": "^4.1.12",
|
|
65
67
|
"@types/js-yaml": "^4.0.9",
|
|
66
68
|
"@types/node": "^20.11.28",
|
|
@@ -80,7 +82,7 @@
|
|
|
80
82
|
"tsconfig-moon": "^1.3.0",
|
|
81
83
|
"tslib": "^2.6.2",
|
|
82
84
|
"tsx": "^4.7.1",
|
|
83
|
-
"typescript": "^5.4.
|
|
85
|
+
"typescript": "^5.4.3"
|
|
84
86
|
},
|
|
85
87
|
"engines": {
|
|
86
88
|
"node": ">=18.12.0",
|
|
@@ -101,18 +103,6 @@
|
|
|
101
103
|
"./static/.releaserc.yml": "./static/.releaserc.yml"
|
|
102
104
|
},
|
|
103
105
|
"types": "./cjs/index.d.ts",
|
|
104
|
-
"commitlint": {
|
|
105
|
-
"extends": [
|
|
106
|
-
"@commitlint/config-conventional"
|
|
107
|
-
],
|
|
108
|
-
"rules": {
|
|
109
|
-
"body-max-line-length": [
|
|
110
|
-
1,
|
|
111
|
-
"always",
|
|
112
|
-
100
|
|
113
|
-
]
|
|
114
|
-
}
|
|
115
|
-
},
|
|
116
106
|
"packemon": {
|
|
117
107
|
"format": "cjs",
|
|
118
108
|
"platform": "node"
|