Compare commits
117 Commits
0b17faf618
...
v0.0.1-alp
| Author | SHA1 | Date | |
|---|---|---|---|
| a354004201 | |||
| 942be59715 | |||
| 70e376c939 | |||
| 62a1ad83ab | |||
| 47c5a47ffa | |||
| 9bd6e1fc04 | |||
| 73600055fc | |||
| 80907a89a9 | |||
| 2472374157 | |||
| b72a10db94 | |||
| d097988dfd | |||
| cb9e8e1107 | |||
| 7bb7df788e | |||
| f26cf6404e | |||
| 7f867b02d6 | |||
| 8c04e7ace5 | |||
| 74a05a39e1 | |||
| f11e402d16 | |||
| 19130e361d | |||
| af0670b9a0 | |||
| a236d96971 | |||
| 2fa142708e | |||
| 71b5017c82 | |||
| ac9ce206dd | |||
| 2b9a859e7e | |||
| 1e3b755b88 | |||
| 46579ac6d9 | |||
| cded5982d4 | |||
| e6041b03ee | |||
| 7cbc8c8b84 | |||
| 7b1a0b054b | |||
| d6dce0908e | |||
| 3661cf5c25 | |||
| b25debabb2 | |||
| 2646ecbdd2 | |||
| d7bfeabed1 | |||
| 83305031fd | |||
| 12c338581a | |||
| 8044547488 | |||
| 2397fc2004 | |||
| 120ee75bf7 | |||
| 8b814222c8 | |||
| c81ae4ee1c | |||
| 9e6d82b44d | |||
| 10fcdbe89f | |||
| 5342e60811 | |||
| ab1d8fa556 | |||
| 84091ecdba | |||
| 1ed753506d | |||
| 3d5a8ee464 | |||
| 1980a184e4 | |||
| 3d803dffdb | |||
| e3cba33ea1 | |||
| b07c33e5a3 | |||
| 8ba663c038 | |||
| 6a7fcadd2f | |||
| 710bdd878a | |||
| aeb154ad83 | |||
| d4575b15a4 | |||
| 1172fe8a7c | |||
| b7809c94d9 | |||
| b82438f2f5 | |||
| 78527307b2 | |||
| 211bad836e | |||
| 96292589b3 | |||
| 799be62f3c | |||
| 81bcc648e3 | |||
| 2386a14d7a | |||
| 5df8c092be | |||
| f06b621b8d | |||
| cd064539eb | |||
| cf2484705a | |||
| afab215a9e | |||
| 6c7f17893b | |||
| a282940d9b | |||
| 36b1df7ef8 | |||
| dc4beb2d27 | |||
| 3203f54ccd | |||
| f429bd43ab | |||
| f7da816a2c | |||
| fdf5e257c6 | |||
| 8cb416ecc8 | |||
| 2c265d79cb | |||
| c0aa64db63 | |||
| 8622408e0b | |||
| 6fc69fc6bc | |||
| 6779d1c346 | |||
| 65873bd31f | |||
| 5948c5cfed | |||
| 494ee3f58e | |||
| d266dbde68 | |||
| 5b7f9f2c48 | |||
| 0a9ae1002c | |||
| a087929f58 | |||
| f83de9baa2 | |||
| 233298daa5 | |||
| 4b0028f7d7 | |||
| f33554ed97 | |||
| 4b9a2254df | |||
| 30b39b836a | |||
| 8b40d3f69b | |||
| 09e5fdf209 | |||
| 772463e579 | |||
| 86647034c8 | |||
| 01e2d404fb | |||
| e084663f19 | |||
| c680152004 | |||
| e08195177d | |||
| 587f1eb3a2 | |||
| 508aab3417 | |||
| 18aa9e7670 | |||
| 8141c6ab69 | |||
| 2a9b571b7a | |||
| 320968f994 | |||
| eed01197c0 | |||
| a20d377834 | |||
| 1b07f5628a |
23
.gitignore
vendored
23
.gitignore
vendored
@@ -3,7 +3,10 @@ docker-compose.yml
|
||||
frontend/.tanstack/
|
||||
frontend/.output/
|
||||
frontend/.nitro/
|
||||
scripts/releases
|
||||
releases/
|
||||
LstWrapper/bin
|
||||
LstWrapper/publish
|
||||
LstWrapper/obj
|
||||
|
||||
# ---> Go
|
||||
# If you prefer the allow list template instead of the deny list, see community template:
|
||||
@@ -32,20 +35,6 @@ go.work.sum
|
||||
# env file
|
||||
.env
|
||||
|
||||
# But not these files...
|
||||
!/.gitignore
|
||||
|
||||
!*.go
|
||||
!go.sum
|
||||
!go.mod
|
||||
|
||||
!README.md
|
||||
!LICENSE
|
||||
|
||||
# !Makefile
|
||||
|
||||
# ...even if they are in subdirectories
|
||||
!*/
|
||||
|
||||
# ---> Node
|
||||
# Logs
|
||||
@@ -196,3 +185,7 @@ dist
|
||||
test-results/
|
||||
|
||||
backend/go.sum
|
||||
BUILD_NUMBER
|
||||
scripts/resetDanger.js
|
||||
LstWrapper/Program_vite_as_Static.txt
|
||||
scripts/stopPool.go
|
||||
|
||||
28
.release-it.json
Normal file
28
.release-it.json
Normal file
@@ -0,0 +1,28 @@
|
||||
{
|
||||
"git": {
|
||||
"commitMessage": "chore(release): v${version}",
|
||||
"tagName": "v${version}",
|
||||
"requireCleanWorkingDir": true,
|
||||
"addUntrackedFiles": true
|
||||
},
|
||||
"npm": {
|
||||
"publish": false
|
||||
},
|
||||
"hooks": {
|
||||
"after:release": "node ./scripts/create-gitea-release.js ${version}"
|
||||
},
|
||||
"github": false,
|
||||
"plugins": {
|
||||
"@release-it/conventional-changelog": {
|
||||
"preset": "conventionalcommits",
|
||||
"infile": "CHANGELOG.md",
|
||||
"config": ".versionrc.json"
|
||||
}
|
||||
},
|
||||
"gitea": {
|
||||
"host": "https://${GITEA_URL}",
|
||||
"tokenRef": "GITEA_TOKEN"
|
||||
},
|
||||
|
||||
"files": ["package.json", "CHANGELOG.md"]
|
||||
}
|
||||
@@ -8,10 +8,10 @@
|
||||
{ "type": "refactor", "section": "🛠️ Code Refactor" },
|
||||
{ "type": "perf", "hidden": false, "section": "🚀 Performance" },
|
||||
{ "type": "test", "section": "📝 Testing Code" },
|
||||
{ "type": "ci", "hidden": true, "section": "📈 Project changes" },
|
||||
{ "type": "ci", "hidden": false, "section": "📈 Project changes" },
|
||||
{ "type": "build", "hidden": true, "section": "📈 Project Builds" }
|
||||
],
|
||||
"commitUrlFormat": "https://git.tuffraid.net/cowch/logistics_support_tool/commits/{{hash}}",
|
||||
"compareUrlFormat": "https://git.tuffraid.net/cowch/logistics_support_tool/compare/{{previousTag}}...{{currentTag}}",
|
||||
"header": "# All changes to lst are shown below.\n"
|
||||
"header": "# All changes to lst are shown below.\nReleases are combined zip of backend and frontend."
|
||||
}
|
||||
|
||||
28
.vscode/settings.json
vendored
Normal file
28
.vscode/settings.json
vendored
Normal file
@@ -0,0 +1,28 @@
|
||||
{
|
||||
"editor.defaultFormatter": "esbenp.prettier-vscode",
|
||||
"workbench.colorTheme": "Default Dark+",
|
||||
"prettier.tabWidth": 4,
|
||||
"terminal.integrated.env.windows": {},
|
||||
"editor.formatOnSave": true,
|
||||
"[javascript]": {
|
||||
"editor.formatOnSave": true
|
||||
},
|
||||
"[javascriptreact]": {
|
||||
"editor.formatOnSave": true
|
||||
},
|
||||
"[typescript]": {
|
||||
"editor.formatOnSave": true
|
||||
},
|
||||
"[typescriptreact]": {
|
||||
"editor.formatOnSave": true
|
||||
},
|
||||
"[json]": {
|
||||
"editor.formatOnSave": true
|
||||
},
|
||||
"[graphql]": {
|
||||
"editor.formatOnSave": true
|
||||
},
|
||||
"[handlebars]": {
|
||||
"editor.formatOnSave": true
|
||||
}
|
||||
}
|
||||
213
CHANGELOG.md
Normal file
213
CHANGELOG.md
Normal file
@@ -0,0 +1,213 @@
|
||||
# Changelog
|
||||
|
||||
## [0.0.1-alpha.2](https://git.tuffraid.net/cowch/logistics_support_tool/compare/v0.0.1-alpha.1...v0.0.1-alpha.2) (2025-07-16)
|
||||
|
||||
## [0.0.3-alpha.22](https://git.tuffraid.net/cowch/logistics_support_tool/compare/v0.0.3-alpha.21...v0.0.3-alpha.22) (2025-07-12)
|
||||
|
||||
### Bug Fixes
|
||||
|
||||
* **changelog:** moved packages ([f11e402](https://git.tuffraid.net/cowch/logistics_support_tool/commit/f11e402d16c750c3001ceebbdfd2f073de1e2703))
|
||||
|
||||
## [0.0.3-alpha.21](https://git.tuffraid.net/cowch/logistics_support_tool/compare/v0.0.3-alpha.19...v0.0.3-alpha.21) (2025-07-12)
|
||||
|
||||
### Bug Fixes
|
||||
|
||||
* **package.json:** corrections to the commit changelog stuff ([a236d96](https://git.tuffraid.net/cowch/logistics_support_tool/commit/a236d9697198e5474a8c311984c22ae6f0d1901e))
|
||||
|
||||
## [0.0.3-alpha.20](https://git.tuffraid.net/cowch/logistics_support_tool/compare/v0.0.3-alpha.19...v0.0.3-alpha.20) (2025-07-12)
|
||||
|
||||
### Bug Fixes
|
||||
|
||||
* **package.json:** corrections to the commit changelog stuff ([a236d96](https://git.tuffraid.net/cowch/logistics_support_tool/commit/a236d9697198e5474a8c311984c22ae6f0d1901e))
|
||||
|
||||
## [0.0.3-alpha.19](https://git.tuffraid.net/cowch/logistics_support_tool/compare/v0.0.3-alpha.18...v0.0.3-alpha.19) (2025-07-12)
|
||||
|
||||
### Bug Fixes
|
||||
|
||||
* **changelog:** readd the header back in ([71b5017](https://git.tuffraid.net/cowch/logistics_support_tool/commit/71b5017c82e718f1c63f3862c0953d1554e7cf5b))
|
||||
|
||||
## [0.0.3-alpha.18](https://git.tuffraid.net/cowch/logistics_support_tool/compare/v0.0.3-alpha.17...v0.0.3-alpha.18) (2025-07-12)
|
||||
|
||||
### Bug Fixes
|
||||
|
||||
* **build:** minor change to the build system to trigger new tags ([2b9a859](https://git.tuffraid.net/cowch/logistics_support_tool/commit/2b9a859e7e944eee590d0d51b95fa13405d21790))
|
||||
|
||||
## [0.0.3-alpha.17](https://git.tuffraid.net/cowch/logistics_support_tool/compare/v0.0.3-alpha.16...v0.0.3-alpha.17) (2025-07-12)
|
||||
|
||||
### Bug Fixes
|
||||
|
||||
* **changelog:** changes here ([46579ac](https://git.tuffraid.net/cowch/logistics_support_tool/commit/46579ac6d9819085d183eba1dafb6b8873f2dd0e))
|
||||
|
||||
## [0.0.3-alpha.16](https://git.tuffraid.net/cowch/logistics_support_tool/compare/v0.0.3-alpha.15...v0.0.3-alpha.16) (2025-07-12)
|
||||
|
||||
### Bug Fixes
|
||||
|
||||
* **h:** sssdasjhksdf ([e6041b0](https://git.tuffraid.net/cowch/logistics_support_tool/commit/e6041b03ee38888fa4e53a498b0414941ff701de))
|
||||
|
||||
## [0.0.3-alpha.15](https://git.tuffraid.net/cowch/logistics_support_tool/compare/v0.0.3-alpha.14...v0.0.3-alpha.15) (2025-07-12)
|
||||
|
||||
### Bug Fixes
|
||||
|
||||
* **d:** d ([7b1a0b0](https://git.tuffraid.net/cowch/logistics_support_tool/commit/7b1a0b054b05e33ecd754b91a080fc83ff214630))
|
||||
|
||||
## [0.0.3-alpha.14](https://git.tuffraid.net/cowch/logistics_support_tool/compare/v0.0.3-alpha.13...v0.0.3-alpha.14) (2025-07-12)
|
||||
|
||||
### Bug Fixes
|
||||
|
||||
* **changelog:** more change log stuff ([3661cf5](https://git.tuffraid.net/cowch/logistics_support_tool/commit/3661cf5c25b919035853a135bc89d1fc3d5df428))
|
||||
|
||||
## [0.0.3-alpha.12](https://git.tuffraid.net/cowch/logistics_support_tool/compare/v0.0.3-alpha.11...v0.0.3-alpha.12) (2025-07-12)
|
||||
|
||||
### Bug Fixes
|
||||
|
||||
* **release:** re ([8330503](https://git.tuffraid.net/cowch/logistics_support_tool/commit/83305031fd8bbf7465269bd517a318d12f1e8414))
|
||||
## [0.0.3-alpha.11](https://git.tuffraid.net/cowch/logistics_support_tool/compare/v0.0.3-alpha.10...v0.0.3-alpha.11) (2025-07-12)
|
||||
|
||||
### Bug Fixes
|
||||
|
||||
* **bogus:** this is crap ([8044547](https://git.tuffraid.net/cowch/logistics_support_tool/commit/80445474881da87ee431d0c3212dcd458a3ec69d))
|
||||
## [0.0.3-alpha.10](https://git.tuffraid.net/cowch/logistics_support_tool/compare/v0.0.3-alpha.9...v0.0.3-alpha.10) (2025-07-12)
|
||||
|
||||
### Bug Fixes
|
||||
|
||||
* **jfhsldkfhja:** ghjskdhkflasfdfg ([120ee75](https://git.tuffraid.net/cowch/logistics_support_tool/commit/120ee75bf763a8a98aae1fd8f00925eee203af2a))
|
||||
## [0.0.3-alpha.9](https://git.tuffraid.net/cowch/logistics_support_tool/compare/v0.0.3-alpha.8...v0.0.3-alpha.9) (2025-07-12)
|
||||
|
||||
### Bug Fixes
|
||||
|
||||
* **fucl:** fuck ([c81ae4e](https://git.tuffraid.net/cowch/logistics_support_tool/commit/c81ae4ee1c28854313705786d1d03d9886abaca0))
|
||||
## [0.0.3-alpha.8](https://git.tuffraid.net/cowch/logistics_support_tool/compare/v0.0.3-alpha.7...v0.0.3-alpha.8) (2025-07-12)
|
||||
|
||||
### Bug Fixes
|
||||
|
||||
* **change:** fuck ([10fcdbe](https://git.tuffraid.net/cowch/logistics_support_tool/commit/10fcdbe89f54548800fbbca86a011ecb8a9c9234))
|
||||
## [0.0.3-alpha.7](https://git.tuffraid.net/cowch/logistics_support_tool/compare/v0.0.3-alpha.6...v0.0.3-alpha.7) (2025-07-12)
|
||||
|
||||
### Bug Fixes
|
||||
|
||||
* **release:** changes ([ab1d8fa](https://git.tuffraid.net/cowch/logistics_support_tool/commit/ab1d8fa5562f82f566d9777e61634e90bb6eb1e3))
|
||||
## [0.0.3-alpha.6](https://git.tuffraid.net/cowch/logistics_support_tool/compare/v0.0.3-alpha.5...v0.0.3-alpha.6) (2025-07-12)
|
||||
|
||||
### Bug Fixes
|
||||
|
||||
* **release:** more changes ([1ed7535](https://git.tuffraid.net/cowch/logistics_support_tool/commit/1ed753506d040e94fd8eb9c2978d96e8f38f1fc5))
|
||||
## [0.0.3-alpha.5](https://git.tuffraid.net/cowch/logistics_support_tool/compare/v0.0.3-alpha.4...v0.0.3-alpha.5) (2025-07-12)
|
||||
|
||||
### Bug Fixes
|
||||
|
||||
* **release:** changes to the changelog portion so its no longer a link ([1980a18](https://git.tuffraid.net/cowch/logistics_support_tool/commit/1980a184e4a6c4ddbd43f24771453e88d0e03198))
|
||||
## [0.0.3-alpha.4](https://git.tuffraid.net/cowch/logistics_support_tool/compare/v0.0.3-alpha.3...v0.0.3-alpha.4) (2025-07-12)
|
||||
## [0.0.3-alpha.3](https://git.tuffraid.net/cowch/logistics_support_tool/compare/v0.0.3-alpha.2...v0.0.3-alpha.3) (2025-07-12)
|
||||
|
||||
### Bug Fixes
|
||||
|
||||
* **release:** more fixes ([6a7fcad](https://git.tuffraid.net/cowch/logistics_support_tool/commit/6a7fcadd2f8c52faec33bab7b2e73b0ef9943895))
|
||||
## [0.0.3-alpha.2](https://git.tuffraid.net/cowch/logistics_support_tool/compare/v0.0.3-alpha.1...v0.0.3-alpha.2) (2025-07-12)
|
||||
## [0.0.3-alpha.1](https://git.tuffraid.net/cowch/logistics_support_tool/compare/v0.0.2...v0.0.3-alpha.1) (2025-07-12)
|
||||
|
||||
### Bug Fixes
|
||||
|
||||
* **release:** something ([b7809c9](https://git.tuffraid.net/cowch/logistics_support_tool/commit/b7809c94d96a2168804e0b82413537af1c064b31))
|
||||
## [0.0.2](https://git.tuffraid.net/cowch/logistics_support_tool/compare/v0.0.2-alpha.15...v0.0.2) (2025-07-12)
|
||||
## [0.0.2-alpha.15](https://git.tuffraid.net/cowch/logistics_support_tool/compare/v0.0.2-alpha.14...v0.0.2-alpha.15) (2025-07-12)
|
||||
|
||||
### Bug Fixes
|
||||
|
||||
* **release:** cahgnes ([799be62](https://git.tuffraid.net/cowch/logistics_support_tool/commit/799be62f3c77631a4108ee9e92f19157ab597dff))
|
||||
## [0.0.2-alpha.14](https://git.tuffraid.net/cowch/logistics_support_tool/compare/v0.0.2-alpha.13...v0.0.2-alpha.14) (2025-07-12)
|
||||
|
||||
### Bug Fixes
|
||||
|
||||
* **release:** corrections ([2386a14](https://git.tuffraid.net/cowch/logistics_support_tool/commit/2386a14d7a76f89653a13de3a0d86e1bf55934d5))
|
||||
## [0.0.2-alpha.13](https://git.tuffraid.net/cowch/logistics_support_tool/compare/v0.0.2-alpha.12...v0.0.2-alpha.13) (2025-07-12)
|
||||
|
||||
### Bug Fixes
|
||||
|
||||
* **release:** conflicting tags ([f06b621](https://git.tuffraid.net/cowch/logistics_support_tool/commit/f06b621b8dc0cc8fc7084fa259408f0faafb6b74))
|
||||
## [0.0.2-alpha.12](https://git.tuffraid.net/cowch/logistics_support_tool/compare/v0.0.2-alpha.11...v0.0.2-alpha.12) (2025-07-12)
|
||||
|
||||
### Bug Fixes
|
||||
|
||||
* **release:** change to get the release to build then release stuff ([afab215](https://git.tuffraid.net/cowch/logistics_support_tool/commit/afab215a9e29732d8236c45c4a8417c9b1e02b1e))
|
||||
* **release:** removed the intial before bump ([cf24847](https://git.tuffraid.net/cowch/logistics_support_tool/commit/cf2484705a65d065ec75690e21bf6e8f2e32a0f5))
|
||||
## [0.0.2-alpha.11](https://git.tuffraid.net/cowch/logistics_support_tool/compare/v0.0.2-alpha.10...v0.0.2-alpha.11) (2025-07-12)
|
||||
|
||||
### Bug Fixes
|
||||
|
||||
* **release:** var not defined ([a282940](https://git.tuffraid.net/cowch/logistics_support_tool/commit/a282940d9b1334743af31b96fbb3fd8228ee290a))
|
||||
## [0.0.2-alpha.10](https://git.tuffraid.net/cowch/logistics_support_tool/compare/v0.0.2-alpha.9...v0.0.2-alpha.10) (2025-07-12)
|
||||
|
||||
### Bug Fixes
|
||||
|
||||
* **release:** error in function ([dc4beb2](https://git.tuffraid.net/cowch/logistics_support_tool/commit/dc4beb2d2768c8e5f5f3f629b13bb38373c2a0a2))
|
||||
## [0.0.2-alpha.9](https://git.tuffraid.net/cowch/logistics_support_tool/compare/v0.0.2-alpha.8...v0.0.2-alpha.9) (2025-07-12)
|
||||
|
||||
### Bug Fixes
|
||||
|
||||
* **release:** checking the build file failes but not sure why ([f429bd4](https://git.tuffraid.net/cowch/logistics_support_tool/commit/f429bd43ab85df0419c1f06fb551d9af5fd418ae))
|
||||
## [0.0.2-alpha.8](https://git.tuffraid.net/cowch/logistics_support_tool/compare/v0.0.2-alpha.7...v0.0.2-alpha.8) (2025-07-12)
|
||||
## [0.0.2-alpha.7](https://git.tuffraid.net/cowch/logistics_support_tool/compare/v0.0.2-alpha.6...v0.0.2-alpha.7) (2025-07-12)
|
||||
|
||||
### Bug Fixes
|
||||
|
||||
* **relrease:** maybe finally got it ([c0aa64d](https://git.tuffraid.net/cowch/logistics_support_tool/commit/c0aa64db634cff5a6597215035929f16b0edfca0))
|
||||
## [0.0.2-alpha.6](https://git.tuffraid.net/cowch/logistics_support_tool/compare/v0.0.2-alpha.5...v0.0.2-alpha.6) (2025-07-12)
|
||||
|
||||
### Bug Fixes
|
||||
|
||||
* **release fixes:** more fixes ([6fc69fc](https://git.tuffraid.net/cowch/logistics_support_tool/commit/6fc69fc6bcbda7f978dbd332ef23ef0501653c50))
|
||||
## [0.0.2-alpha.5](https://git.tuffraid.net/cowch/logistics_support_tool/compare/v0.0.2-alpha.4...v0.0.2-alpha.5) (2025-07-12)
|
||||
|
||||
### Bug Fixes
|
||||
|
||||
* **release:** more fixes ([65873bd](https://git.tuffraid.net/cowch/logistics_support_tool/commit/65873bd31f4c4e5cc0a77aa171822cd842353e45))
|
||||
## [0.0.2-alpha.4](https://git.tuffraid.net/cowch/logistics_support_tool/compare/v0.0.2-alpha.3...v0.0.2-alpha.4) (2025-07-12)
|
||||
|
||||
### Bug Fixes
|
||||
|
||||
* **package:** added changes to the package.json so we see the release stuff ([494ee3f](https://git.tuffraid.net/cowch/logistics_support_tool/commit/494ee3f58ea5af3d18a640ffff99918f460fb4aa))
|
||||
## [0.0.2-alpha.3](https://git.tuffraid.net/cowch/logistics_support_tool/compare/v0.0.2-alpha.2...v0.0.2-alpha.3) (2025-07-12)
|
||||
|
||||
### Bug Fixes
|
||||
|
||||
* **release:** more bug fixes ([5b7f9f2](https://git.tuffraid.net/cowch/logistics_support_tool/commit/5b7f9f2c482531ea52100bff191b943e218e72df))
|
||||
* **release:** more work on the release stuff ([233298d](https://git.tuffraid.net/cowch/logistics_support_tool/commit/233298daa5850178974be675bb8566fa8c0a8b0a))
|
||||
## [0.0.2-alpha.2](https://git.tuffraid.net/cowch/logistics_support_tool/compare/v0.0.2-alpha.1...v0.0.2-alpha.2) (2025-07-12)
|
||||
|
||||
### Bug Fixes
|
||||
|
||||
* **releases:** more fun release stuff ([f33554e](https://git.tuffraid.net/cowch/logistics_support_tool/commit/f33554ed973e65e2488512bfd8359577967698b7))
|
||||
## [0.0.2-alpha.1](https://git.tuffraid.net/cowch/logistics_support_tool/compare/v0.0.2-alpha.0...v0.0.2-alpha.1) (2025-07-12)
|
||||
|
||||
### Bug Fixes
|
||||
|
||||
* **package:** made changes to get the correct alpha passed over in the prerelease stuff ([09e5fdf](https://git.tuffraid.net/cowch/logistics_support_tool/commit/09e5fdf209f1a11f975d77e445f777623a5d3509))
|
||||
* **release it:** type in how i wrote the release-it file ([8664703](https://git.tuffraid.net/cowch/logistics_support_tool/commit/86647034c8f5c9b04c6f51fb95b929de4f65fc63))
|
||||
* **release:** removed version from being passed over ([30b39b8](https://git.tuffraid.net/cowch/logistics_support_tool/commit/30b39b836a8ac01aea3f7a4ddf3b6ec25d6a36cd))
|
||||
## [0.0.1-alpha.4.14-cowch](https://git.tuffraid.net/cowch/logistics_support_tool/compare/v0.0.1-alpha.3.14-cowch...v0.0.1-alpha.4.14-cowch) (2025-07-12)
|
||||
|
||||
### Bug Fixes
|
||||
|
||||
* **releaseit:** changes to get the version to update ([e084663](https://git.tuffraid.net/cowch/logistics_support_tool/commit/e084663f19ada722007bd00c73a4ca7015a4f71e))
|
||||
## [0.0.1-alpha.3.14-cowch](https://git.tuffraid.net/cowch/logistics_support_tool/compare/v0.0.1-alpha.2.14-cowch...v0.0.1-alpha.3.14-cowch) (2025-07-12)
|
||||
|
||||
### Bug Fixes
|
||||
|
||||
* **releaseit:** changes to get it to actaully run ([c680152](https://git.tuffraid.net/cowch/logistics_support_tool/commit/c680152004b85442cad5bf6eeac407de67fead32))
|
||||
## [0.0.1-alpha.2.14-cowch](https://git.tuffraid.net/cowch/logistics_support_tool/compare/v0.0.1-alpha.1.14-cowch...v0.0.1-alpha.2.14-cowch) (2025-07-12)
|
||||
|
||||
### Bug Fixes
|
||||
|
||||
* **package json:** correction to the version ([8141c6a](https://git.tuffraid.net/cowch/logistics_support_tool/commit/8141c6ab698ce246f999ed304d306f72c50a2708))
|
||||
* **releases:** a few more tweaks to the releasing ([587f1eb](https://git.tuffraid.net/cowch/logistics_support_tool/commit/587f1eb3a2841780903db6c9b6f4fa760baa29e9))
|
||||
* **releases:** corrections to reduce the build number to be true ([18aa9e7](https://git.tuffraid.net/cowch/logistics_support_tool/commit/18aa9e7670ffd531c0c03b946dad599600bd5c5b))
|
||||
## [0.0.1-alpha.1.14-cowch](https://git.tuffraid.net/cowch/logistics_support_tool/compare/0.0.2...v0.0.1-alpha.1.14-cowch) (2025-07-12)
|
||||
## v0.0.1-alpha-1 (2025-07-12)
|
||||
|
||||
### Features
|
||||
|
||||
* **starter:** intial starter release ([b370cb1](https://git.tuffraid.net/cowch/logistics_support_tool/commit/b370cb17c86bb3f8727cebfa607bb6423fc89644))
|
||||
|
||||
### Bug Fixes
|
||||
|
||||
* **releases:** spawn fixes to overcome npx and powershell ([eed0119](https://git.tuffraid.net/cowch/logistics_support_tool/commit/eed01197c0825e9039c3a2f0d8845c3b21380faf))
|
||||
9
LstWrapper/LstWrapper.csproj
Normal file
9
LstWrapper/LstWrapper.csproj
Normal file
@@ -0,0 +1,9 @@
|
||||
<Project Sdk="Microsoft.NET.Sdk.Web">
|
||||
|
||||
<PropertyGroup>
|
||||
<TargetFramework>net9.0</TargetFramework>
|
||||
<Nullable>enable</Nullable>
|
||||
<ImplicitUsings>enable</ImplicitUsings>
|
||||
</PropertyGroup>
|
||||
|
||||
</Project>
|
||||
85
LstWrapper/Program.cs
Normal file
85
LstWrapper/Program.cs
Normal file
@@ -0,0 +1,85 @@
|
||||
using Microsoft.AspNetCore.Builder;
|
||||
using Microsoft.AspNetCore.Http;
|
||||
using Microsoft.Extensions.DependencyInjection;
|
||||
using System.Net.Http;
|
||||
|
||||
var builder = WebApplication.CreateBuilder(args);
|
||||
// to build the binary dotnet publish -c Release -o ./publish
|
||||
// Go backend
|
||||
builder.Services.AddHttpClient("GoBackend", client =>
|
||||
{
|
||||
client.BaseAddress = new Uri("http://localhost:8080");
|
||||
client.Timeout = TimeSpan.FromSeconds(30);
|
||||
});
|
||||
|
||||
// Node frontend
|
||||
builder.Services.AddHttpClient("NodeFrontend", client =>
|
||||
{
|
||||
client.BaseAddress = new Uri("http://localhost:3000");
|
||||
client.Timeout = TimeSpan.FromSeconds(30);
|
||||
});
|
||||
|
||||
var app = builder.Build();
|
||||
|
||||
app.UseStaticFiles();
|
||||
|
||||
app.Use((Func<HttpContext, Func<Task>, Task>)(async (context, next) =>
|
||||
{
|
||||
var clientFactory = context.RequestServices.GetRequiredService<IHttpClientFactory>();
|
||||
|
||||
var isApiRequest =
|
||||
context.Request.Path.StartsWithSegments("/api") ||
|
||||
context.Request.Path.StartsWithSegments("/graphql") ||
|
||||
context.Request.Path.StartsWithSegments("/auth") ||
|
||||
!context.Request.Method.Equals("GET", StringComparison.OrdinalIgnoreCase);
|
||||
|
||||
var client = clientFactory.CreateClient(isApiRequest ? "GoBackend" : "NodeFrontend");
|
||||
|
||||
try
|
||||
{
|
||||
var requestUri = context.Request.Path + context.Request.QueryString;
|
||||
|
||||
var request = new HttpRequestMessage(
|
||||
new HttpMethod(context.Request.Method),
|
||||
requestUri);
|
||||
|
||||
foreach (var header in context.Request.Headers)
|
||||
{
|
||||
if (!request.Headers.TryAddWithoutValidation(header.Key, header.Value.ToArray()))
|
||||
{
|
||||
request.Content ??= new StreamContent(context.Request.Body);
|
||||
request.Content.Headers.TryAddWithoutValidation(header.Key, header.Value.ToArray());
|
||||
}
|
||||
}
|
||||
|
||||
if (context.Request.ContentLength > 0 || context.Request.Headers.ContainsKey("Transfer-Encoding"))
|
||||
{
|
||||
request.Content = new StreamContent(context.Request.Body);
|
||||
}
|
||||
|
||||
var response = await client.SendAsync(request, HttpCompletionOption.ResponseHeadersRead, context.RequestAborted);
|
||||
|
||||
context.Response.StatusCode = (int)response.StatusCode;
|
||||
|
||||
foreach (var header in response.Headers)
|
||||
{
|
||||
context.Response.Headers[header.Key] = header.Value.ToArray();
|
||||
}
|
||||
|
||||
foreach (var header in response.Content.Headers)
|
||||
{
|
||||
context.Response.Headers[header.Key] = header.Value.ToArray();
|
||||
}
|
||||
|
||||
context.Response.Headers.Remove("transfer-encoding");
|
||||
|
||||
await response.Content.CopyToAsync(context.Response.Body);
|
||||
}
|
||||
catch (HttpRequestException ex)
|
||||
{
|
||||
context.Response.StatusCode = isApiRequest ? 503 : 502;
|
||||
await context.Response.WriteAsync($"{(isApiRequest ? "Go API" : "Frontend")} unavailable: {ex.Message}");
|
||||
}
|
||||
}));
|
||||
|
||||
app.Run();
|
||||
23
LstWrapper/Properties/launchSettings.json
Normal file
23
LstWrapper/Properties/launchSettings.json
Normal file
@@ -0,0 +1,23 @@
|
||||
{
|
||||
"$schema": "https://json.schemastore.org/launchsettings.json",
|
||||
"profiles": {
|
||||
"http": {
|
||||
"commandName": "Project",
|
||||
"dotnetRunMessages": true,
|
||||
"launchBrowser": true,
|
||||
"applicationUrl": "http://localhost:5015",
|
||||
"environmentVariables": {
|
||||
"ASPNETCORE_ENVIRONMENT": "Development"
|
||||
}
|
||||
},
|
||||
"https": {
|
||||
"commandName": "Project",
|
||||
"dotnetRunMessages": true,
|
||||
"launchBrowser": true,
|
||||
"applicationUrl": "https://localhost:7208;http://localhost:5015",
|
||||
"environmentVariables": {
|
||||
"ASPNETCORE_ENVIRONMENT": "Development"
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
8
LstWrapper/appsettings.Development.json
Normal file
8
LstWrapper/appsettings.Development.json
Normal file
@@ -0,0 +1,8 @@
|
||||
{
|
||||
"Logging": {
|
||||
"LogLevel": {
|
||||
"Default": "Information",
|
||||
"Microsoft.AspNetCore": "Warning"
|
||||
}
|
||||
}
|
||||
}
|
||||
9
LstWrapper/appsettings.json
Normal file
9
LstWrapper/appsettings.json
Normal file
@@ -0,0 +1,9 @@
|
||||
{
|
||||
"Logging": {
|
||||
"LogLevel": {
|
||||
"Default": "Information",
|
||||
"Microsoft.AspNetCore": "Warning"
|
||||
}
|
||||
},
|
||||
"AllowedHosts": "*"
|
||||
}
|
||||
15
LstWrapper/web.config
Normal file
15
LstWrapper/web.config
Normal file
@@ -0,0 +1,15 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<configuration>
|
||||
<location path="." inheritInChildApplications="false">
|
||||
<system.webServer>
|
||||
<handlers>
|
||||
<add name="aspNetCore" path="*" verb="*" modules="AspNetCoreModuleV2" resourceType="Unspecified" />
|
||||
</handlers>
|
||||
<aspNetCore processPath="dotnet"
|
||||
arguments=".\LstWrapper.dll"
|
||||
stdoutLogEnabled="true"
|
||||
stdoutLogFile=".\logs\stdout"
|
||||
hostingModel="inprocess" />
|
||||
</system.webServer>
|
||||
</location>
|
||||
</configuration>
|
||||
6
LstWrapper/wwwroot/index.html
Normal file
6
LstWrapper/wwwroot/index.html
Normal file
@@ -0,0 +1,6 @@
|
||||
<!DOCTYPE html>
|
||||
<html>
|
||||
<body>
|
||||
<p>The new begining to lst</p>
|
||||
</body>
|
||||
</html>
|
||||
@@ -11,10 +11,19 @@ func main() {
|
||||
fmt.Println("Welcome to lst backend where all the fun happens.")
|
||||
r := gin.Default()
|
||||
|
||||
r.GET("/", errorLoc)
|
||||
|
||||
r.GET("/api/ping", func(c *gin.Context) {
|
||||
c.JSON(200, gin.H{"message": "pong"})
|
||||
})
|
||||
|
||||
r.Any("/api", errorApiLoc)
|
||||
r.Any("/", errorLoc)
|
||||
r.Run(":8080")
|
||||
}
|
||||
|
||||
func errorLoc(c *gin.Context) {
|
||||
c.JSON(http.StatusOK, gin.H{"message": "welcome to lst system you might have just encountered an incorrect area of the app"})
|
||||
c.JSON(http.StatusBadRequest, gin.H{"message": "welcome to lst system you might have just encountered an incorrect area of the app"})
|
||||
}
|
||||
func errorApiLoc(c *gin.Context) {
|
||||
c.JSON(http.StatusBadRequest, gin.H{"message": "looks like you have encountered an api route that dose not exist"})
|
||||
}
|
||||
|
||||
@@ -1,21 +1,27 @@
|
||||
---
|
||||
services:
|
||||
lst_backend:
|
||||
# build: . # Tell Docker Compose to build the image using the Dockerfile in the current directory
|
||||
image: git.tuffraid.net/cowch/logistics_support_tool:backend-latest
|
||||
container_name: lst_backend # A friendly name for your running container
|
||||
volumes:
|
||||
- /path/to/frontend/backend:/data
|
||||
ports:
|
||||
- "8080:8080"
|
||||
restart: unless-stopped
|
||||
lst_backend:
|
||||
# build: . # Tell Docker Compose to build the image using the Dockerfile in the current directory
|
||||
build:
|
||||
context: .
|
||||
dockerfile: ./backend/Dockerfile
|
||||
image: git.tuffraid.net/cowch/logistics_support_tool:backend-latest
|
||||
container_name: lst_backend # A friendly name for your running container
|
||||
volumes:
|
||||
- /path/to/backend/data:/data
|
||||
ports:
|
||||
- "8080:8080"
|
||||
restart: unless-stopped
|
||||
|
||||
lst_frontend:
|
||||
# build: . # Tell Docker Compose to build the image using the Dockerfile in the current directory
|
||||
image: git.tuffraid.net/cowch/logistics_support_tool:frontend-latest
|
||||
container_name: lst_frontend # A friendly name for your running container
|
||||
volumes:
|
||||
- /path/to/frontend/data:/data
|
||||
ports:
|
||||
- "3120:3000"
|
||||
restart: unless-stopped
|
||||
lst_frontend:
|
||||
# build: . # Tell Docker Compose to build the image using the Dockerfile in the current directory
|
||||
build:
|
||||
context: .
|
||||
dockerfile: ./frontend/Dockerfile
|
||||
image: git.tuffraid.net/cowch/logistics_support_tool:frontend-latest
|
||||
container_name: lst_frontend # A friendly name for your running container
|
||||
volumes:
|
||||
- /path/to/frontend/data:/data
|
||||
ports:
|
||||
- "3120:3000"
|
||||
restart: unless-stopped
|
||||
|
||||
@@ -1,48 +1,51 @@
|
||||
// src/routes/index.tsx
|
||||
import * as fs from 'node:fs'
|
||||
import { createFileRoute, useRouter } from '@tanstack/react-router'
|
||||
import { createServerFn } from '@tanstack/react-start'
|
||||
import * as fs from "node:fs";
|
||||
import { createFileRoute, useRouter } from "@tanstack/react-router";
|
||||
import { createServerFn } from "@tanstack/react-start";
|
||||
|
||||
const filePath = 'count.txt'
|
||||
const filePath = "count.txt";
|
||||
|
||||
async function readCount() {
|
||||
return parseInt(
|
||||
await fs.promises.readFile(filePath, 'utf-8').catch(() => '0'),
|
||||
)
|
||||
return parseInt(
|
||||
await fs.promises.readFile(filePath, "utf-8").catch(() => "0")
|
||||
);
|
||||
}
|
||||
|
||||
const getCount = createServerFn({
|
||||
method: 'GET',
|
||||
method: "GET",
|
||||
}).handler(() => {
|
||||
return readCount()
|
||||
})
|
||||
return readCount();
|
||||
});
|
||||
|
||||
const updateCount = createServerFn({ method: 'POST' })
|
||||
.validator((d: number) => d)
|
||||
.handler(async ({ data }) => {
|
||||
const count = await readCount()
|
||||
await fs.promises.writeFile(filePath, `${count + data}`)
|
||||
})
|
||||
const updateCount = createServerFn({ method: "POST" })
|
||||
.validator((d: number) => d)
|
||||
.handler(async ({ data }) => {
|
||||
const count = await readCount();
|
||||
await fs.promises.writeFile(filePath, `${count + data}`);
|
||||
});
|
||||
|
||||
export const Route = createFileRoute('/')({
|
||||
component: Home,
|
||||
loader: async () => await getCount(),
|
||||
})
|
||||
export const Route = createFileRoute("/")({
|
||||
component: Home,
|
||||
loader: async () => await getCount(),
|
||||
});
|
||||
|
||||
function Home() {
|
||||
const router = useRouter()
|
||||
const state = Route.useLoaderData()
|
||||
const router = useRouter();
|
||||
const state = Route.useLoaderData();
|
||||
|
||||
return (
|
||||
<button
|
||||
type="button"
|
||||
onClick={() => {
|
||||
updateCount({ data: 1 }).then(() => {
|
||||
router.invalidate()
|
||||
})
|
||||
}}
|
||||
>
|
||||
Add 1 to {state}?
|
||||
</button>
|
||||
)
|
||||
}
|
||||
return (
|
||||
<div>
|
||||
<p>This is just something to put in here</p>
|
||||
<button
|
||||
type="button"
|
||||
onClick={() => {
|
||||
updateCount({ data: 1 }).then(() => {
|
||||
router.invalidate();
|
||||
});
|
||||
}}
|
||||
>
|
||||
Add 1 to {state}?
|
||||
</button>
|
||||
</div>
|
||||
);
|
||||
}
|
||||
|
||||
10774
package-lock.json
generated
10774
package-lock.json
generated
File diff suppressed because it is too large
Load Diff
69
package.json
69
package.json
@@ -1,32 +1,43 @@
|
||||
{
|
||||
"name": "logistics_support_tool",
|
||||
"version": "1.0.0",
|
||||
"description": "This is the new logisitcs support tool",
|
||||
"main": "index.js",
|
||||
"scripts": {
|
||||
"test": "echo \"Error: no test specified\" && exit 1",
|
||||
"backend": "cd backend && go run .",
|
||||
"docker:front":"docker build -t logistics_support_tool:frontend-latest -f frontend/Dockerfile ./frontend",
|
||||
"docker:back":"docker build -t logistics_support_tool:backend-latest -f backend/Dockerfile ./backend",
|
||||
"docker": "powershell -File ./scripts/dockerBuild.ps1",
|
||||
"release":"powershell -File ./scripts/release.ps1",
|
||||
"commit":"cz"
|
||||
},
|
||||
"repository": {
|
||||
"type": "git",
|
||||
"url": "https://git.tuffraid.net/cowch/logistics_support_tool.git"
|
||||
},
|
||||
"keywords": [],
|
||||
"author": "",
|
||||
"license": "ISC",
|
||||
"type": "module",
|
||||
"devDependencies": {
|
||||
"cz-conventional-changelog": "^3.3.0",
|
||||
"standard-version": "^9.5.0"
|
||||
},
|
||||
"config": {
|
||||
"commitizen": {
|
||||
"path": "./node_modules/cz-conventional-changelog"
|
||||
"name": "logistics_support_tool",
|
||||
"version": "0.0.1-alpha.2",
|
||||
"description": "This is the new logisitcs support tool",
|
||||
"private": true,
|
||||
"main": "index.js",
|
||||
"scripts": {
|
||||
"test": "echo \"Error: no test specified\" && exit 1",
|
||||
"backend": "cd backend && go run .",
|
||||
"build": "powershell -File ./scripts/build.ps1",
|
||||
"docker:front": "docker build -t logistics_support_tool:frontend-latest -f frontend/Dockerfile ./frontend",
|
||||
"docker:back": "docker build -t logistics_support_tool:backend-latest -f backend/Dockerfile ./backend",
|
||||
"docker": "powershell -File ./scripts/dockerBuild.ps1",
|
||||
"release:createZip": "powershell -File ./scripts/release.ps1",
|
||||
"release:gitea": "node ./scripts/create-gitea-release.js",
|
||||
"release:publish": "release-it --verbose --non-interactive --preRelease=alpha",
|
||||
"commit": "cz"
|
||||
},
|
||||
"repository": {
|
||||
"type": "git",
|
||||
"url": "https://git.tuffraid.net/cowch/logistics_support_tool.git"
|
||||
},
|
||||
"keywords": [],
|
||||
"author": "",
|
||||
"license": "ISC",
|
||||
"type": "module",
|
||||
"devDependencies": {
|
||||
"@release-it/conventional-changelog": "^10.0.1",
|
||||
"cz-conventional-changelog": "^3.3.0",
|
||||
"release-it": "^19.0.3",
|
||||
"standard-version": "^9.5.0"
|
||||
},
|
||||
"config": {
|
||||
"commitizen": {
|
||||
"path": "./node_modules/cz-conventional-changelog"
|
||||
}
|
||||
},
|
||||
"dependencies": {
|
||||
"dotenv": "^17.2.0",
|
||||
"fs-extra": "^11.3.0",
|
||||
"node-fetch": "^3.3.2"
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
137
scripts/build.ps1
Normal file
137
scripts/build.ps1
Normal file
@@ -0,0 +1,137 @@
|
||||
$scriptDir = Split-Path -Parent $MyInvocation.MyCommand.Definition
|
||||
$rootDir = Join-Path $scriptDir ".."
|
||||
$releaseScript = Join-Path $scriptDir "release.ps1"
|
||||
$packageJsonPath = Join-Path $rootDir "package.json"
|
||||
|
||||
# Path to BUILD_NUMBER file, assuming root is one level up from scripts
|
||||
$buildNumberFile = Join-Path $scriptDir "..\BUILD_NUMBER"
|
||||
$envFile = Join-Path $rootDir ".env"
|
||||
|
||||
if (Test-Path $envFile) {
|
||||
Write-Host "Loading environment variables from $envFile"
|
||||
Get-Content $envFile | ForEach-Object {
|
||||
if ($_ -match "^\s*([^#][^=]*)=(.*)$") {
|
||||
$name = $matches[1].Trim()
|
||||
$value = $matches[2].Trim()
|
||||
[System.Environment]::SetEnvironmentVariable($name, $value)
|
||||
}
|
||||
}
|
||||
} else {
|
||||
Write-Host ".env file not found at $envFile"
|
||||
}
|
||||
|
||||
if (-not $env:BUILD_NAME) {
|
||||
Write-Warning "BUILD_NAME environment variable is not set. Please make sure you have entered the correct info the env"
|
||||
exit 1
|
||||
}
|
||||
|
||||
function Get-PackageVersion {
|
||||
param (
|
||||
[string]$packageJsonPath
|
||||
)
|
||||
|
||||
if (-not (Test-Path $packageJsonPath)) {
|
||||
Write-Warning "package.json not found at $packageJsonPath"
|
||||
return $null
|
||||
}
|
||||
|
||||
$jsonContent = Get-Content $packageJsonPath -Raw
|
||||
try {
|
||||
$json = $jsonContent | ConvertFrom-Json
|
||||
return $json.version
|
||||
}
|
||||
catch {
|
||||
Write-Warning "Failed to parse package.json: $_"
|
||||
return $null
|
||||
}
|
||||
}
|
||||
|
||||
$version = Get-PackageVersion -packageJsonPath $packageJsonPath
|
||||
Write-Host "Project version from package.json is: $version"
|
||||
$buildNumberFile = Join-Path $rootDir "BUILD_NUMBER"
|
||||
|
||||
if (-not (Test-Path $buildNumberFile)) {
|
||||
$initialBuildValue = "1-$($env:BUILD_NAME)"
|
||||
Write-Host "BUILD_NUMBER file not found. Creating with value: $initialBuildValue"
|
||||
Set-Content -Path $buildNumberFile -Value $initialBuildValue
|
||||
} else {
|
||||
Write-Host "BUILD_NUMBER file exists at $buildNumberFile, and will not be created"
|
||||
}
|
||||
|
||||
function Update-BuildNumber {
|
||||
if (-not (Test-Path $buildNumberFile)) {
|
||||
Write-Warning "BUILD_NUMBER file not found at $buildNumberFile"
|
||||
return $null
|
||||
}
|
||||
|
||||
$current = Get-Content $buildNumberFile -Raw
|
||||
$current = $current.Trim()
|
||||
|
||||
if ($current -match '^(\d+)-(.*)$') {
|
||||
$number = [int]$matches[1]
|
||||
$name = $matches[2]
|
||||
|
||||
$newNumber = $number + 1
|
||||
$newBuildNumber = "$newNumber-$name"
|
||||
|
||||
Set-Content -Path $buildNumberFile -Value $newBuildNumber
|
||||
|
||||
Write-Host "Build number updated from $current to $newBuildNumber"
|
||||
|
||||
return $newBuildNumber
|
||||
} else {
|
||||
Write-Warning "BUILD_NUMBER file content '$current' is not in the expected 'number-name' format."
|
||||
return $null
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
Push-Location $rootDir/backend
|
||||
Write-Host "Building the app"
|
||||
go build -ldflags "-X main.version=$($version)-$($initialBuildValue)" -o lst_backend.exe ./main.go
|
||||
if ($LASTEXITCODE -ne 0) {
|
||||
Write-Warning "Backend build failed!"
|
||||
Pop-Location
|
||||
break
|
||||
}
|
||||
|
||||
Write-Host "Backend build finished successfully."
|
||||
|
||||
Pop-Location
|
||||
|
||||
Push-Location $rootDir/frontend
|
||||
Write-Host "Building the frontend."
|
||||
npm run build
|
||||
|
||||
if ($LASTEXITCODE -ne 0) {
|
||||
Write-Warning "Fronend build failed!"
|
||||
Pop-Location
|
||||
break
|
||||
}
|
||||
|
||||
Write-Host "Fronend build finished successfully."
|
||||
Pop-Location
|
||||
|
||||
Write-Host "Building wrapper"
|
||||
Push-Location $rootDir/LstWrapper
|
||||
dotnet publish -c Release -o ./publish
|
||||
|
||||
Pop-Location
|
||||
Update-BuildNumber
|
||||
|
||||
Write-Host "Zipping up the release"
|
||||
npm run release:createZip
|
||||
|
||||
$choice = Read-Host "Are we going to create a release? y/N"
|
||||
|
||||
if ($choice -eq "y" -or $choice -eq "Y") {
|
||||
npm run release:gitea $version
|
||||
npm run release:publish
|
||||
}
|
||||
|
||||
break
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
252
scripts/create-gitea-release.js
Normal file
252
scripts/create-gitea-release.js
Normal file
@@ -0,0 +1,252 @@
|
||||
const version = process.argv[2];
|
||||
if (!version) {
|
||||
console.error("Version not passed to create-gitea-release.js");
|
||||
process.exit(1);
|
||||
}
|
||||
|
||||
import fs from "fs-extra";
|
||||
import path from "path";
|
||||
import { fileURLToPath } from "url";
|
||||
import fetch from "node-fetch";
|
||||
import dotenv from "dotenv";
|
||||
dotenv.config({ path: "./.env" });
|
||||
|
||||
// Resolve the directory of the current script
|
||||
const __filename = fileURLToPath(import.meta.url);
|
||||
const __dirname = path.dirname(__filename);
|
||||
|
||||
// Absolute path to BUILD_NUMBER
|
||||
const buildNumberPath = path.resolve(__dirname, "../BUILD_NUMBER");
|
||||
|
||||
// Load build number from BUILD_NUMBER file
|
||||
let buildNumber = "0";
|
||||
try {
|
||||
const rawBuild = fs.readFileSync(buildNumberPath, "utf8");
|
||||
console.log("Raw build", rawBuild);
|
||||
buildNumber = rawBuild.trim();
|
||||
} catch (e) {
|
||||
console.log(e);
|
||||
console.warn("BUILD_NUMBER file not found, defaulting to 0");
|
||||
}
|
||||
|
||||
const fullVersion = `${version}.${buildNumber}`;
|
||||
|
||||
const { GITEA_URL, GITEA_USERNAME, GITEA_REPO, GITEA_TOKEN } = process.env;
|
||||
if (!GITEA_URL || !GITEA_USERNAME || !GITEA_REPO || !GITEA_TOKEN) {
|
||||
console.error("Missing required environment variables");
|
||||
process.exit(1);
|
||||
}
|
||||
|
||||
// Step 1: Generate or update CHANGELOG.md
|
||||
// console.log("Generating CHANGELOG.md...");
|
||||
// const result = spawnSync(
|
||||
// "npx",
|
||||
// [
|
||||
// "conventional-changelog",
|
||||
// "-p",
|
||||
// "conventionalcommits",
|
||||
// "-i",
|
||||
// "CHANGELOG.md",
|
||||
// "-s",
|
||||
// "-r",
|
||||
// "0",
|
||||
// ],
|
||||
// { stdio: "inherit", shell: true }
|
||||
// );
|
||||
|
||||
// if (result.status !== 0) {
|
||||
// console.error("Failed to generate changelog");
|
||||
// process.exit(1);
|
||||
// }
|
||||
|
||||
// Corrected function to get the latest changelog entry from CHANGELOG.md
|
||||
const getLatestChangelog = async () => {
|
||||
try {
|
||||
const changelogPath = path.resolve(__dirname, "../CHANGELOG.md");
|
||||
console.log(`Attempting to read changelog from: ${changelogPath}`); // Debugging line
|
||||
const changelogContent = await fs.readFile(changelogPath, "utf8");
|
||||
console.log(
|
||||
"Changelog content read successfully (first 200 chars):",
|
||||
changelogContent.substring(0, 200)
|
||||
); // Debugging line
|
||||
|
||||
const lines = changelogContent.trim().split(/\r?\n/);
|
||||
|
||||
let latestReleaseNotes = [];
|
||||
let inLatestRelease = false;
|
||||
let foundFirstHeading = false;
|
||||
|
||||
// Regex to match a conventional changelog heading format: "## [version](url) (date)"
|
||||
// The key is to correctly parse the URL part in parentheses.
|
||||
const releaseHeadingRegex = /^## \[.*?\]\(.*?\)\s\(.*\)$/;
|
||||
|
||||
for (const line of lines) {
|
||||
// Trim each line to handle potential leading/trailing spaces when matching
|
||||
const trimmedLine = line.trim();
|
||||
|
||||
if (trimmedLine.match(releaseHeadingRegex)) {
|
||||
if (!foundFirstHeading) {
|
||||
// This is the first (latest) release heading we encounter
|
||||
inLatestRelease = true;
|
||||
foundFirstHeading = true;
|
||||
// We skip the heading line itself from the notes body
|
||||
continue;
|
||||
} else {
|
||||
// This is a subsequent release heading, meaning we've passed the latest release's content
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
||||
// If we are currently inside the latest release block, add the line
|
||||
if (inLatestRelease) {
|
||||
latestReleaseNotes.push(trimmedLine); // Use trimmedLine here
|
||||
}
|
||||
}
|
||||
|
||||
// Clean up the collected notes by filtering out empty lines if they are not meaningful content
|
||||
// and joining them back, then trimming.
|
||||
const cleanedNotes = latestReleaseNotes
|
||||
.filter((line) => line !== "") // Remove truly empty lines
|
||||
.join("\n")
|
||||
.trim();
|
||||
|
||||
if (cleanedNotes) {
|
||||
console.log(
|
||||
"Successfully extracted latest changelog notes:\n",
|
||||
cleanedNotes
|
||||
);
|
||||
return cleanedNotes;
|
||||
} else {
|
||||
console.warn(
|
||||
"Could not find any content for the latest changelog entry in CHANGELOG.md. This might mean the file is empty, or the regex for headings is incorrect, or there's no content after the heading."
|
||||
);
|
||||
return "No changelog notes available.";
|
||||
}
|
||||
} catch (err) {
|
||||
console.error("Error reading or parsing CHANGELOG.md:", err);
|
||||
throw err;
|
||||
}
|
||||
};
|
||||
|
||||
const releaseNotes = await getLatestChangelog();
|
||||
|
||||
// Step 3: Create or update Gitea release
|
||||
const createOrUpdateRelease = async () => {
|
||||
const tagName = `v${version}`;
|
||||
const apiBase = `https://${GITEA_URL}/api/v1/repos/${GITEA_USERNAME}/${GITEA_REPO}`;
|
||||
|
||||
const existing = await fetch(`${apiBase}/releases/tags/${tagName}`, {
|
||||
headers: { Authorization: `token ${GITEA_TOKEN}` },
|
||||
});
|
||||
|
||||
let release;
|
||||
|
||||
if (existing.ok) {
|
||||
const existingRelease = await existing.json();
|
||||
console.log(`Release ${tagName} already exists. Updating it.`);
|
||||
|
||||
const updateResponse = await fetch(
|
||||
`${apiBase}/releases/${existingRelease.id}`,
|
||||
{
|
||||
method: "PATCH",
|
||||
headers: {
|
||||
Authorization: `token ${GITEA_TOKEN}`,
|
||||
"Content-Type": "application/json",
|
||||
},
|
||||
body: JSON.stringify({
|
||||
name: tagName,
|
||||
body: releaseNotes,
|
||||
draft: false,
|
||||
prerelease: true,
|
||||
}),
|
||||
}
|
||||
);
|
||||
|
||||
if (!updateResponse.ok) {
|
||||
const errorText = await updateResponse.text();
|
||||
throw new Error(
|
||||
`Failed to update release: ${updateResponse.status} - ${errorText}`
|
||||
);
|
||||
}
|
||||
|
||||
release = await updateResponse.json();
|
||||
console.log("Release updated:", release.html_url || release.url);
|
||||
} else if (existing.status === 404) {
|
||||
const createResponse = await fetch(`${apiBase}/releases`, {
|
||||
method: "POST",
|
||||
headers: {
|
||||
Authorization: `token ${GITEA_TOKEN}`,
|
||||
"Content-Type": "application/json",
|
||||
},
|
||||
body: JSON.stringify({
|
||||
tag_name: tagName,
|
||||
name: `Release ${fullVersion}`,
|
||||
body: releaseNotes,
|
||||
draft: false,
|
||||
prerelease: true,
|
||||
}),
|
||||
});
|
||||
|
||||
if (!createResponse.ok) {
|
||||
const errorText = await createResponse.text();
|
||||
throw new Error(
|
||||
`Failed to create release: ${createResponse.status} - ${errorText}`
|
||||
);
|
||||
}
|
||||
|
||||
release = await createResponse.json();
|
||||
console.log("Release created:", release.html_url || release.url);
|
||||
} else {
|
||||
const errorText = await existing.text();
|
||||
throw new Error(
|
||||
`Failed to check release: ${existing.status} - ${errorText}`
|
||||
);
|
||||
}
|
||||
|
||||
return release;
|
||||
};
|
||||
|
||||
const uploadAsset = async (release) => {
|
||||
const apiUrl = `https://${GITEA_URL}/api/v1/repos/${GITEA_USERNAME}/${GITEA_REPO}/releases/assets?tag=${release.tag_name}`;
|
||||
const filePath = `releases/release-${fullVersion}.zip`;
|
||||
|
||||
if (!(await fs.pathExists(filePath))) {
|
||||
console.warn(`Zip file not found: ${filePath}. Skipping asset upload.`);
|
||||
return;
|
||||
}
|
||||
|
||||
const FormData = (await import("form-data")).default;
|
||||
const form = new FormData();
|
||||
form.append("name", `release-${fullVersion}.zip`);
|
||||
form.append("attachment", fs.createReadStream(filePath));
|
||||
|
||||
const response = await fetch(apiUrl, {
|
||||
method: "POST",
|
||||
headers: {
|
||||
Authorization: `token ${GITEA_TOKEN}`,
|
||||
...form.getHeaders(),
|
||||
},
|
||||
body: form,
|
||||
});
|
||||
|
||||
if (!response.ok) {
|
||||
const errorText = await response.text();
|
||||
throw new Error(
|
||||
`Failed to upload asset: ${response.status} - ${errorText}`
|
||||
);
|
||||
}
|
||||
|
||||
const asset = await response.json();
|
||||
console.log("Asset uploaded:", asset.browser_download_url || asset.url);
|
||||
};
|
||||
|
||||
// Run everything
|
||||
(async () => {
|
||||
try {
|
||||
const release = await createOrUpdateRelease();
|
||||
// await uploadAsset(release); // fix this later and just update the readme.
|
||||
} catch (err) {
|
||||
console.error(err);
|
||||
process.exit(1);
|
||||
}
|
||||
})();
|
||||
@@ -1,6 +1,6 @@
|
||||
Write-Host "Building the docker images for front and backend"
|
||||
docker build -t logistics_support_tool:frontend-latest -f ../frontend/Dockerfile ../frontend
|
||||
docker build -t logistics_support_tool:backend-latest -f ../backend/Dockerfile ../backend
|
||||
docker build -t logistics_support_tool:frontend-latest -f ./frontend/Dockerfile --no-cache ./frontend
|
||||
docker build -t logistics_support_tool:backend-latest -f ./backend/Dockerfile --no-cache ./backend
|
||||
|
||||
Write-Host "Tagging the builds with latest this is for testing test basically."
|
||||
docker tag logistics_support_tool:frontend-latest git.tuffraid.net/cowch/logistics_support_tool:frontend-latest
|
||||
|
||||
46
scripts/iisControls.ps1
Normal file
46
scripts/iisControls.ps1
Normal file
@@ -0,0 +1,46 @@
|
||||
param (
|
||||
[string]$ServerName,
|
||||
[string]$AppPoolName,
|
||||
[string]$StopOrStart
|
||||
)
|
||||
|
||||
write-host $StopOrStart
|
||||
if ($StopOrStart -eq "stop") {
|
||||
Invoke-Command -ComputerName $ServerName -Credential $cred -ScriptBlock {
|
||||
param($AppPoolName)
|
||||
|
||||
Import-Module WebAdministration
|
||||
Write-Host "Stopping AppPool '$AppPoolName' on $($env:COMPUTERNAME)"
|
||||
|
||||
try {
|
||||
Stop-WebAppPool -Name $AppPoolName -ErrorAction Stop
|
||||
|
||||
Start-Sleep -Seconds 2
|
||||
$state = (Get-WebAppPoolState -Name $AppPoolName).Value
|
||||
Write-Host "Result: $state"
|
||||
} catch {
|
||||
Write-Error $_.Exception.Message
|
||||
exit 1
|
||||
}
|
||||
} -ArgumentList $AppPoolName
|
||||
}
|
||||
|
||||
if ($StopOrStart -eq "start"){
|
||||
Invoke-Command -ComputerName $ServerName -Credential $cred -ScriptBlock {
|
||||
param($AppPoolName)
|
||||
|
||||
Import-Module WebAdministration
|
||||
Write-Host "Starting AppPool '$AppPoolName' on $($env:COMPUTERNAME)"
|
||||
|
||||
try {
|
||||
Start-WebAppPool -Name $AppPoolName
|
||||
Start-Sleep -Seconds 2
|
||||
$state = (Get-WebAppPoolState -Name $AppPoolName).Value
|
||||
Write-Host "Result: $state"
|
||||
} catch {
|
||||
Write-Error $_.Exception.Message
|
||||
exit 1
|
||||
}
|
||||
} -ArgumentList $AppPoolName
|
||||
}
|
||||
|
||||
@@ -1,33 +1,45 @@
|
||||
$scriptDir = Split-Path -Parent $MyInvocation.MyCommand.Path
|
||||
$versionFile = Join-Path $scriptDir "..\VERSION"
|
||||
$rootDir = Join-Path $scriptDir ".."
|
||||
$packageJsonPath = Join-Path $rootDir "package.json"
|
||||
$env:GOOS = "windows"
|
||||
$env:GOARCH = "amd64"
|
||||
$keepReleases = 10
|
||||
|
||||
if (Test-Path $versionFile) {
|
||||
$version = Get-Content $versionFile -Raw | ForEach-Object { $_.Trim() }
|
||||
Write-Host "Project version: $version"
|
||||
} else {
|
||||
Write-Host "VERSION file not found at $versionFile"
|
||||
function Get-PackageVersion {
|
||||
param (
|
||||
[string]$packageJsonPath
|
||||
)
|
||||
|
||||
if (-not (Test-Path $packageJsonPath)) {
|
||||
Write-Warning "package.json not found at $packageJsonPath"
|
||||
return $null
|
||||
}
|
||||
|
||||
$jsonContent = Get-Content $packageJsonPath -Raw
|
||||
try {
|
||||
$json = $jsonContent | ConvertFrom-Json
|
||||
return $json.version
|
||||
}
|
||||
catch {
|
||||
Write-Warning "Failed to parse package.json: $_"
|
||||
return $null
|
||||
}
|
||||
}
|
||||
|
||||
Write-Host "Building release version: $version"
|
||||
$version = Get-PackageVersion -packageJsonPath $packageJsonPath
|
||||
Write-Host "Project version from package.json is: $version"
|
||||
$buildNumberFile = Join-Path $rootDir "BUILD_NUMBER"
|
||||
|
||||
Write-Host "`nBuilding Go backend..."
|
||||
Push-Location ./backend
|
||||
if (Test-Path $buildNumberFile) {
|
||||
$buildNumber = Get-Content $buildNumberFile -Raw
|
||||
$buildNumber = $buildNumber.Trim()
|
||||
Write-Host "Current build number: $buildNumber"
|
||||
} else {
|
||||
Write-Warning "BUILD_NUMBER file not found at $buildNumberFile"
|
||||
}
|
||||
|
||||
go build -ldflags "-X main.version=$version" -o lst_backend.exe ./main.go
|
||||
Pop-Location
|
||||
|
||||
Write-Host "`nBuilding frontend..."
|
||||
Push-Location ./frontend
|
||||
npm install
|
||||
npm run build
|
||||
Pop-Location
|
||||
|
||||
|
||||
$releaseFolder = Join-Path $scriptDir "releases"
|
||||
$zipName = "release-$version.zip"
|
||||
$releaseFolder = Join-Path $rootDir "releases"
|
||||
$zipName = "release-v$version-$buildNumber.zip"
|
||||
$zipPath = Join-Path $releaseFolder $zipName
|
||||
|
||||
|
||||
@@ -54,15 +66,38 @@ if ($existingZips.Count -gt $keepReleases) {
|
||||
|
||||
Write-Host "`nPackaging release: $($zipName)"
|
||||
|
||||
$filesToInclude = @(
|
||||
"backend\lst_backend.exe",
|
||||
"frontend\.nitro",
|
||||
"frontend\.tanstack",
|
||||
"frontend\.output",
|
||||
"frontend\public",
|
||||
"VERSION"
|
||||
# Create a temporary staging directory
|
||||
$tempStageDir = New-Item -ItemType Directory -Path (Join-Path $env:TEMP "lst_staging") -Force
|
||||
|
||||
# Copy files to organized structure
|
||||
$filesToCopy = @(
|
||||
@{ Source = "backend\lst_backend.exe"; Destination = "backend\lst_backend.exe" },
|
||||
@{ Source = "LstWrapper\publish"; Destination = "lstwrapper\" },
|
||||
@{ Source = "frontend\.nitro"; Destination = "frontend\.nitro" },
|
||||
@{ Source = "frontend\.tanstack"; Destination = "frontend\.tanstack" },
|
||||
@{ Source = "frontend\.output"; Destination = "frontend\.output" },
|
||||
@{ Source = "frontend\public"; Destination = "frontend\public" },
|
||||
@{ Source = "package.json"; Destination = "package.json" },
|
||||
@{ Source = "CHANGELOG.md"; Destination = "CHANGELOG.md" },
|
||||
@{ Source = "README.md"; Destination = "README.md" }
|
||||
)
|
||||
|
||||
Compress-Archive -Path $filesToInclude -DestinationPath $zipPath
|
||||
foreach ($file in $filesToCopy) {
|
||||
$destPath = Join-Path $tempStageDir $file.Destination
|
||||
New-Item -ItemType Directory -Path (Split-Path $destPath -Parent) -Force | Out-Null
|
||||
Copy-Item -Path $file.Source -Destination $destPath -Recurse -Force
|
||||
}
|
||||
|
||||
Write-Host "`nRelease package created at: $($zipPath)"
|
||||
# Create the zip from the staged directory
|
||||
Compress-Archive -Path "$tempStageDir\*" -DestinationPath $zipPath
|
||||
|
||||
# Clean up temporary directory
|
||||
Remove-Item $tempStageDir -Recurse -Force
|
||||
|
||||
Write-Host "`nRelease package created at: $($zipPath)"
|
||||
Write-Host "Organized structure:"
|
||||
Write-Host "- backend/"
|
||||
Write-Host "- frontend/"
|
||||
Write-Host "- lstwrapper/"
|
||||
Write-Host "- CHANGELOG.md"
|
||||
Write-Host "- README.md"
|
||||
Reference in New Issue
Block a user