Skip to content

Commit

Permalink
Merge pull request #18 from solacecommunity/task/versioned-builds
Browse files Browse the repository at this point in the history
Task/versioned builds
  • Loading branch information
nicholasdgoodman authored Dec 19, 2024
2 parents a0740f2 + 0e2241c commit 2b20780
Show file tree
Hide file tree
Showing 3 changed files with 12 additions and 1 deletion.
7 changes: 7 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -73,6 +73,13 @@ Open a browser and navigate to http://localhost:4173/stable/ or http://localhost

_Commit the changes and push back to the repo_
```
git add -A
git commit -a -m "Update latest with new feature ..."
git push origin gh-pages
```

A note to maintainers: the build process will insert a timestamp into the `index.html` which can be observed for troubleshooting by inspecting the page content. For example, the HTML of the website should begin as follows:
```
<!doctype html>
<html lang="en" data-build-time="2024-12-19T22:03:42.043Z">
```
2 changes: 1 addition & 1 deletion index.html
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
<!doctype html>
<html lang="en">
<html lang="en" data-build-time="%BUILD_TIME%">
<head>
<meta charset="UTF-8" />
<link rel="icon" href="./favicon.ico" />
Expand Down
4 changes: 4 additions & 0 deletions vite.config.js
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@ import react from "@vitejs/plugin-react";
// https://vitejs.dev/config/
export default defineConfig(async () => ({
plugins: [react()],
base: './',

// Vite options tailored for Tauri development and only applied in `tauri dev` or `tauri build`
//
Expand All @@ -18,4 +19,7 @@ export default defineConfig(async () => ({
ignored: ["**/src-tauri/**"],
},
},
define: {
'import.meta.env.BUILD_TIME': JSON.stringify(new Date().toISOString()),
}
}));

0 comments on commit 2b20780

Please sign in to comment.