Skip to content

Commit 14aca4c

Browse files
committed
fix(ci): docs version
1 parent fdaf1ed commit 14aca4c

2 files changed

Lines changed: 2 additions & 9 deletions

File tree

.github/workflows/docs.yml

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,5 @@
11
name: docs
2+
23
on:
34
workflow_dispatch: { }
45
push:
@@ -16,8 +17,6 @@ jobs:
1617
- uses: actions/checkout@v4
1718
- name: fetch tags
1819
run: git fetch --prune --unshallow --tags
19-
- name: log current tag
20-
run: git describe --tags
2120
- uses: actions/setup-node@v4
2221
- name: build
2322
run: |

docs/.vitepress/config.ts

Lines changed: 1 addition & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -31,7 +31,7 @@ export default defineConfig({
3131
nav: [
3232
{ text: "Guide", link: "/guide/", activeMatch: "/guide/" },
3333
{
34-
text: resolveVersion(), items: [
34+
text: proc.execSync("git describe --abbrev=0 --tags").toString(), items: [
3535
{ text: "Changes", link: "https://github.com/elringus/sprite-dicing/releases/latest" },
3636
{ text: "Contribute", link: "https://github.com/elringus/sprite-dicing/labels/help%20wanted" }
3737
]
@@ -60,9 +60,3 @@ export default defineConfig({
6060
},
6161
sitemap: { hostname: "https://dicing.elringus.com" }
6262
});
63-
64-
function resolveVersion(): string {
65-
const tag = proc.execSync("git describe --tags").toString();
66-
const dashIdx = tag.indexOf("-");
67-
return tag.substring(0, dashIdx);
68-
}

0 commit comments

Comments
 (0)