Repository: JanDeDobbeleer/oh-my-posh
Pull request #5010 (2024-06-06 01:01:30)

chore: bump goreleaser/goreleaser-action from 5.1.0 to 6.0.0
Bumps [goreleaser/goreleaser-action](https://github.com/goreleaser/goreleaser-action) from 5.1.0 to 6.0.0.
<details>
<summary>Release notes</summary>
<p><em>Sourced from <a href="https://github.com/goreleaser/goreleaser-action/releases">goreleaser/goreleaser-action's releases</a>.</em></p>
<blockquote>
<h2>v6.0.0</h2>
<blockquote>
<p>[!WARNING]
<strong>This is a breaking change!</strong></p>
<p>Follow the instructions <a href="https://goreleaser.com/blog/goreleaser-v2/#upgrading">here</a> to upgrade!</p>
</blockquote>
<h2>What's Changed</h2>
<ul>
<li>feat!: use &quot;~&gt; v2&quot; as default by <a href="https://github.com/caarlos0"><code>@​caarlos0</code></a> in <a href="https://redirect.github.com/goreleaser/goreleaser-action/pull/463">goreleaser/goreleaser-action#463</a></li>
</ul>
<p><strong>Full Changelog</strong>: <a href="https://github.com/goreleaser/goreleaser-action/compare/v5...v6.0.0">https://github.com/goreleaser/goreleaser-action/compare/v5...v6.0.0</a></p>
</blockquote>
</details>
<details>
<summary>Commits</summary>
<ul>
<li><a href="https://github.com/goreleaser/goreleaser-action/commit/286f3b13b1b49da4ac219696163fb8c1c93e1200"><code>286f3b1</code></a> ci: fix tests</li>
<li><a href="https://github.com/goreleaser/goreleaser-action/commit/beac41031402cb955b6b1325b39dc6a3aaddfa61"><code>beac410</code></a> ci: update workflow and .goreleaser.yml</li>
<li><a href="https://github.com/goreleaser/goreleaser-action/commit/18bbabc70c50bcffbadb2dc68d6d5266056978cb"><code>18bbabc</code></a> feat!: use &quot;~&gt; v2&quot; as default (<a href="https://redirect.github.com/goreleaser/goreleaser-action/issues/463">#463</a>)</li>
<li>See full diff in <a href="https://github.com/goreleaser/goreleaser-action/compare/5742e2a039330cbb23ebf35f046f814d4c6ff811...286f3b13b1b49da4ac219696163fb8c1c93e1200">compare view</a></li>
</ul>
</details>
<br />


[![Dependabot compatibility score](https://dependabot-badges.githubapp.com/badges/compatibility_score?dependency-name=goreleaser/goreleaser-action&package-manager=github_actions&previous-version=5.1.0&new-version=6.0.0)](https://docs.github.com/en/github/managing-security-vulnerabilities/about-dependabot-security-updates#about-compatibility-scores)

Dependabot will resolve any conflicts with this PR as long as you don't alter it yourself. You can also trigger a rebase manually by commenting `@dependabot rebase`.

[//]: # (dependabot-automerge-start)
[//]: # (dependabot-automerge-end)

---

<details>
<summary>Dependabot commands and options</summary>
<br />

You can trigger Dependabot actions by commenting on this PR:
- `@dependabot rebase` will rebase this PR
- `@dependabot recreate` will recreate this PR, overwriting any edits that have been made to it
- `@dependabot merge` will merge this PR after your CI passes on it
- `@dependabot squash and merge` will squash and merge this PR after your CI passes on it
- `@dependabot cancel merge` will cancel a previously requested merge and block automerging
- `@dependabot reopen` will reopen this PR if it is closed
- `@dependabot close` will close this PR and stop Dependabot recreating it. You can achieve the same result by closing it manually
- `@dependabot show <dependency name> ignore conditions` will show all of the ignore conditions of the specified dependency
- `@dependabot ignore this major version` will close this PR and stop Dependabot creating any more for this major version (unless you reopen the PR or upgrade to it yourself)
- `@dependabot ignore this minor version` will close this PR and stop Dependabot creating any more for this minor version (unless you reopen the PR or upgrade to it yourself)
- `@dependabot ignore this dependency` will close this PR and stop Dependabot creating any more for this dependency (unless you reopen the PR or upgrade to it yourself)


</details>


Patch:
diff --git a/.github/workflows/build_code.yml b/.github/workflows/build_code.yml
index 60bbcfd9..616e87fe 100644
--- a/.github/workflows/build_code.yml
+++ b/.github/workflows/build_code.yml
@@ -21,7 +21,7 @@ jobs:
     - name: Install Go 🗳
       uses: ./.github/workflows/composite/bootstrap-go
     - name: Run GoReleaser 🚀
-      uses: goreleaser/goreleaser-action@5742e2a039330cbb23ebf35f046f814d4c6ff811
+      uses: goreleaser/goreleaser-action@286f3b13b1b49da4ac219696163fb8c1c93e1200
       with:
         distribution: goreleaser
         version: latest
diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml
index bb0efde7..713e06a1 100644
--- a/.github/workflows/release.yml
+++ b/.github/workflows/release.yml
@@ -60,7 +60,7 @@ jobs:
         env:
           COSIGN_KEY: ${{secrets.COSIGN_KEY}}
       - name: Run GoReleaser 🚀
-        uses: goreleaser/goreleaser-action@5742e2a039330cbb23ebf35f046f814d4c6ff811
+        uses: goreleaser/goreleaser-action@286f3b13b1b49da4ac219696163fb8c1c93e1200
         with:
           distribution: goreleaser
           version: latest
diff --git a/src/.goreleaser.yml b/src/.goreleaser.yml
index 27bf5696..370573b1 100644
--- a/src/.goreleaser.yml
+++ b/src/.goreleaser.yml
@@ -1,5 +1,6 @@
 # Make sure to check the documentation at https://goreleaser.com
 # yaml-language-server: $schema=https://goreleaser.com/static/schema.json
+version: 2
 before:
   hooks:
     - go mod tidy
@@ -46,4 +47,4 @@ archives:
 checksum:
   name_template: 'checksums.txt'
 changelog:
-  skip: true
+  disable: true
diff --git a/src/segments/os.go b/src/segments/os.go
index ee2ab16e..8d06f49e 100644
--- a/src/segments/os.go
+++ b/src/segments/os.go
@@ -38,7 +38,7 @@ func (oi *Os) Enabled() bool {
 		pf := oi.env.Platform()
 		displayDistroName := oi.props.GetBool(DisplayDistroName, false)
 		if displayDistroName {
-			oi.Icon = pf
+			oi.Icon = oi.props.GetString(properties.Property(pf), pf)
 			break
 		}
 		oi.Icon = oi.getDistroIcon(pf)


Test patch:
diff --git a/src/segments/os_test.go b/src/segments/os_test.go
index e0e4db06..9495cfb3 100644
--- a/src/segments/os_test.go
+++ b/src/segments/os_test.go
@@ -76,6 +76,14 @@ func TestOSInfo(t *testing.T) {
 			GOOS:           "linux",
 			Platform:       "crazy",
 		},
+		{
+			Case:              "show distro name, mapped",
+			ExpectedString:    "<3",
+			DisplayDistroName: true,
+			GOOS:              "linux",
+			Icon:              "<3",
+			Platform:          "love",
+		},
 	}
 	for _, tc := range cases {
 		env := new(mock.MockedEnvironment)