Skip to content

Commit 3b2373c

Browse files
committed
fix broken links script
+ exclude hashi and npm package links (429, 403) + fix issue with arg ordering + ensure temp files are being created and stale broken lists are not printed + fix broken links Signed-off-by: Michelle Dhanani <[email protected]>
1 parent ae90800 commit 3b2373c

File tree

4 files changed

+18
-10
lines changed

4 files changed

+18
-10
lines changed

.build/check-broken-links.sh

Lines changed: 15 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -67,27 +67,35 @@ echo "starting link checker"
6767
## Run the broken link checker
6868
report="$(mktemp)"
6969
blc_error=false
70-
blc --recursive http://127.0.0.1:3000 \
71-
\
72-
`## returns 403` \
70+
if ! blc -rv \
71+
`## returns 403`\
7372
--exclude 'https://docs.github.com/en/authentication/managing-commit-signature-verification/signing-commits' \
7473
--exclude 'https://docs.github.com/en/authentication/managing-commit-signature-verification/adding-a-gpg-key-to-your-github-account' \
7574
--exclude 'https://docs.github.com/account-and-profile/setting-up-and-managing-your-personal-account-on-github/managing-email-preferences/remembering-your-github-username-or-email' \
7675
--exclude 'https://docs.github.com/en/authentication/managing-commit-signature-verification/about-commit-signature-verification' \
7776
--exclude 'https://twitter.com/spinframework' \
7877
--exclude 'https://linux.die.net/man/1/which' \
79-
\
80-
`## false positives` \
78+
--exclude 'npmjs.com/package/' \
79+
`## returns 429`\
80+
--exclude 'developer.hashicorp.com' \
81+
`## false positives`\
8182
--exclude 'https://www.gnu.org/software/coreutils/' \
8283
--exclude 'https://crates.io/' \
8384
--exclude 'https://crates.io/crates/bytes' \
8485
--exclude 'https://crates.io/crates/http' \
8586
--exclude 'https://marketplace.visualstudio.com/items?itemName=yzhang.markdown-all-in-one' \
8687
--exclude 'http://localhost:16686/' \
87-
--exclude 'http://localhost:5050/explore' | tee "${report}" || blc_error=true
88+
--exclude 'http://localhost:5050/explore' \
89+
http://127.0.0.1:3000/v3/javascript-components \
90+
| tee "${report}"
91+
then
92+
blc_error=true
93+
fi
8894

89-
cat "${report}" | grep "├─BROKEN─" > broken_links || true
95+
broken_links="$(mktemp)"
96+
grep "├─BROKEN─" "$report" > broken_links || true
9097

98+
final_broken="$(mktemp)"
9199
if [ -s broken_links ]; then
92100
echo "Some links are broken, retrying to check for transient errors"
93101
while read -r line; do

content/v1/python-components.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -240,7 +240,7 @@ Here is an animal fact: {"timestamp":1684299253331,"fact":"Reindeer grow new ant
240240

241241
## An Outbound Redis Example
242242

243-
In this final example, we talk to an existing Redis instance. You can find the official [instructions on how to install Redis here](https://redis.io/docs/getting-started/installation/). We also gave a quick run-through on setting up Redis with Spin in our previous article called [Persistent Storage in Webassembly Applications](https://www.fermyon.com/blog/persistent-storage-in-webassembly-applications), so please take a look at that blog if you need a hand.
243+
In this final example, we talk to an existing Redis instance. You can find the official [instructions on how to install Redis here](https://redis.io/docs/latest/operate/oss_and_stack/install/install-stack/). We also gave a quick run-through on setting up Redis with Spin in our previous article called [Persistent Storage in Webassembly Applications](https://www.fermyon.com/blog/persistent-storage-in-webassembly-applications), so please take a look at that blog if you need a hand.
244244

245245
### Configuration
246246

content/v2/python-components.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -411,7 +411,7 @@ Here is an animal fact: {"timestamp":1713156765221,"fact":"Bats are the only mam
411411

412412
## An Outbound Redis Example
413413

414-
In this final example, we talk to an existing Redis instance. You can find the official [instructions on how to install Redis here](https://redis.io/docs/getting-started/installation/). We also gave a quick run-through on setting up Redis with Spin in our previous article called [Persistent Storage in Webassembly Applications](https://www.fermyon.com/blog/persistent-storage-in-webassembly-applications), so please take a look at that blog if you need a hand.
414+
In this final example, we talk to an existing Redis instance. You can find the official [instructions on how to install Redis here](https://redis.io/docs/latest/operate/oss_and_stack/install/install-stack/). We also gave a quick run-through on setting up Redis with Spin in our previous article called [Persistent Storage in Webassembly Applications](https://www.fermyon.com/blog/persistent-storage-in-webassembly-applications), so please take a look at that blog if you need a hand.
415415

416416
### Configuring Outbound Redis
417417

content/v3/python-components.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -390,7 +390,7 @@ Here is an animal fact: {"timestamp":1713156765221,"fact":"Bats are the only mam
390390

391391
## An Outbound Redis Example
392392

393-
In this final example, we talk to an existing Redis instance. You can find the official [instructions on how to install Redis here](https://redis.io/docs/getting-started/installation/). We also gave a quick run-through on setting up Redis with Spin in our previous article called [Persistent Storage in Webassembly Applications](https://www.fermyon.com/blog/persistent-storage-in-webassembly-applications), so please take a look at that blog if you need a hand.
393+
In this final example, we talk to an existing Redis instance. You can find the official [instructions on how to install Redis here](https://redis.io/docs/latest/operate/oss_and_stack/install/install-stack/). We also gave a quick run-through on setting up Redis with Spin in our previous article called [Persistent Storage in Webassembly Applications](https://www.fermyon.com/blog/persistent-storage-in-webassembly-applications), so please take a look at that blog if you need a hand.
394394

395395
### Configuring Outbound Redis
396396

0 commit comments

Comments
 (0)