Skip to content

Commit

Permalink
test version (#368)
Browse files Browse the repository at this point in the history
  • Loading branch information
MrMissx authored May 15, 2024
1 parent b0fe1e6 commit 33c880e
Show file tree
Hide file tree
Showing 4 changed files with 9 additions and 5 deletions.
2 changes: 1 addition & 1 deletion .env.example
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
PUBLIC_BASE_URL=
PUBLIC_GOOGLE_ANALYTICS=
PUBLIC_GOOGLE_ANALYTICS=
9 changes: 5 additions & 4 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -5,13 +5,14 @@
"license": "MIT",
"type": "module",
"scripts": {
"dev": "vite dev",
"build": "vite build",
"preview": "vite preview",
"dev": "pnpm run generate:version && vite dev",
"build": "pnpm run generate:version && vite build",
"preview": "pnpm run generate:version && vite preview",
"check": "svelte-kit sync && svelte-check --tsconfig ./tsconfig.json",
"check:watch": "svelte-kit sync && svelte-check --tsconfig ./tsconfig.json --watch",
"lint": "prettier --plugin-search-dir . --check . && eslint .",
"format": "prettier --plugin-search-dir . --write ."
"format": "prettier --plugin-search-dir . --write .",
"generate:version": "echo \"export const version = '$(git describe --exact-match --tags 2> /dev/null || echo $(git rev-parse --abbrev-ref HEAD)-$(git rev-parse --short HEAD))'\" > ./src/version.ts"
},
"dependencies": {
"svelte-icons": "^2.1.0"
Expand Down
2 changes: 2 additions & 0 deletions src/lib/components/HelperButton.svelte
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
<script lang="ts">
import { scale } from "svelte/transition"
import { version } from "../../version"
let helperActive = false
Expand Down Expand Up @@ -27,6 +28,7 @@
>
<a class="py-2 hover:underline" href="/support">Support</a>
<a class="py-2 hover:underline" href="https://blog.mrmiss.dev">Blog</a>
<span class="text-xs">{version}</span>
</div>
{/if}
<button
Expand Down
1 change: 1 addition & 0 deletions src/version.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
export const version = 'test-version-1949820'

0 comments on commit 33c880e

Please sign in to comment.