Skip to content

Commit 1d3bbc2

Browse files
committed
WIP
1 parent 472cdc3 commit 1d3bbc2

File tree

2 files changed

+11
-5
lines changed

2 files changed

+11
-5
lines changed

.circleci/config.yml

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -94,15 +94,14 @@ jobs:
9494
echo "[INFO] Starting Antora build..."
9595
npm run build:docs
9696
echo "[INFO] Antora build completed."
97+
- store_artifacts:
98+
path: build
9799
- run:
98100
name: Create ZIP Archive of Build
99101
command: |
100102
set -e
101103
echo "[INFO] Creating zip archive of build directory..."
102104
zip -r build.zip build/
103-
- store_artifacts:
104-
path: build.zip
105-
destination: preview-site.zip
106105
- persist_to_workspace:
107106
root: .
108107
paths:

cmd/validate-redirects/main.go

Lines changed: 9 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,7 @@ package main
22

33
import (
44
"context"
5+
"errors"
56
"flag"
67
"fmt"
78
"io"
@@ -33,6 +34,8 @@ type options struct {
3334
BaseURL string
3435
}
3536

37+
var errFailures = errors.New("failed validation")
38+
3639
func main() {
3740
ctx := context.Background()
3841

@@ -54,9 +57,13 @@ func main() {
5457
}
5558

5659
err := run(ctx, opts)
57-
if err != nil {
60+
switch {
61+
case errors.Is(err, errFailures):
62+
os.Exit(1)
63+
case err != nil:
5864
slog.Error("Unexpected error", "error", err)
5965
os.Exit(1)
66+
default:
6067
}
6168
}
6269

@@ -98,7 +105,7 @@ func run(ctx context.Context, opts options) error {
98105
for _, fail := range failures {
99106
slog.Warn(" " + fail)
100107
}
101-
return nil
108+
return errFailures
102109
}
103110

104111
slog.Info("Success")

0 commit comments

Comments
 (0)