summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorEltrac <hi@guhub.cn>2025-10-21 19:39:17 +0800
committerEltrac <hi@guhub.cn>2025-10-21 19:39:17 +0800
commit8576f57d91b2ff89905874005fdc10bfd9551243 (patch)
tree9282e3ea65bc6218de3dbdbe7ccfb461bb5afee2
parent377a72b003cf5b3dbd2b9120965337ed4a98ade7 (diff)
chore(build): pre-compile custom scripts and run binary at build-time
Former-commit-id: b85ef82f1788f958c7732aaba492f75067149b2b
-rw-r--r--build.sh12
-rwxr-xr-xscripts/build_scripts.sh3
-rw-r--r--scripts/extract_highlights.REMOVED.git-id1
-rw-r--r--scripts/get_external_link_rank.REMOVED.git-id1
-rw-r--r--scripts/get_internal_link_graph.REMOVED.git-id1
5 files changed, 11 insertions, 7 deletions
diff --git a/build.sh b/build.sh
index 5c16f9d4..c963bb02 100644
--- a/build.sh
+++ b/build.sh
@@ -49,13 +49,11 @@ main() {
# ===== Execute Pre-Hugo Actions ===== #
- echo "🏗️ Building and Running Custom Go Scripts"
- cd ./scripts
- go build -o extract_highlights extract_highlights.go
- go build -o extract_links extract_links.go
- ./extract_highlights
- ./extract_links
- cd ../
+ echo "🏗️ Running Custom Go Scripts"
+
+ ./scripts/extract_highlights
+ ./scripts/get_external_link_rank
+ ./scripts/get_internal_link_graph
echo "🏗️ Building UnoCSS..."
npm run build:uno:prod
diff --git a/scripts/build_scripts.sh b/scripts/build_scripts.sh
new file mode 100755
index 00000000..e6de98f0
--- /dev/null
+++ b/scripts/build_scripts.sh
@@ -0,0 +1,3 @@
+go build -o scripts/get_external_link_rank scripts/get_external_link_rank.go
+go build -o scripts/get_internal_link_graph scripts/get_internal_link_graph.go
+go build -o scripts/extract_highlights scripts/extract_highlights.go
diff --git a/scripts/extract_highlights.REMOVED.git-id b/scripts/extract_highlights.REMOVED.git-id
new file mode 100644
index 00000000..6138e0c7
--- /dev/null
+++ b/scripts/extract_highlights.REMOVED.git-id
@@ -0,0 +1 @@
+183c2d5721f5f227e515ea21b7ead33af6ffbcad \ No newline at end of file
diff --git a/scripts/get_external_link_rank.REMOVED.git-id b/scripts/get_external_link_rank.REMOVED.git-id
new file mode 100644
index 00000000..e48f08f0
--- /dev/null
+++ b/scripts/get_external_link_rank.REMOVED.git-id
@@ -0,0 +1 @@
+4571678e8ef545d43e5a2a91b175b0d9e0f00483 \ No newline at end of file
diff --git a/scripts/get_internal_link_graph.REMOVED.git-id b/scripts/get_internal_link_graph.REMOVED.git-id
new file mode 100644
index 00000000..09e48410
--- /dev/null
+++ b/scripts/get_internal_link_graph.REMOVED.git-id
@@ -0,0 +1 @@
+74385a62c9116e6da36b15beebafef26052ca5a0 \ No newline at end of file