Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Make large GIFs an error on tests #2597

Merged
merged 4 commits into from
Mar 1, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions docs/build/provision/_index.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@ linkTitle: "Provision Machines"
weight: 70
type: "docs"
description: "Flexibly provision new machines using the Viam Agent."
images: ["/platform/provisioning-demo.gif"]
videos: ["/platform/provisioning-demo.webm", "/platform/provisioning-demo.mp4"]
tags: ["fleet management", "viam-server", "viam-agent"]
# SME: James Otting
Expand Down
11 changes: 9 additions & 2 deletions layouts/partials/gif.html
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,10 @@
{{ $f := os.Stat $webmLink }}
{{ $sizeInBytes := div $f.Size 1000 }}
{{ if gt $sizeInBytes 1000 }}
{{ warnf "Size of video file %s was %d kB - please reduce file size" $webmLink $sizeInBytes }}
{{ if not hugo.IsProduction }}
{{ warnf "Size of video file %s was %d kB - please reduce file size. This will be an error on PRs." $webmLink $sizeInBytes }}
{{ else }}
{{ end }}
{{ end }}
{{ else }}
{{errorf "File not found - did you use the absolute file path? %s" $webmLink}}
Expand All @@ -14,7 +17,11 @@
{{ $f := os.Stat $mp4Link }}
{{ $sizeInBytes := div $f.Size 1000 }}
{{ if gt $sizeInBytes 1000 }}
{{ warnf "Size of video file %s was %d kB - please reduce file size" $mp4Link $sizeInBytes }}
{{ if not hugo.IsProduction }}
{{ warnf "Size of video file %s was %d kB - please reduce file size. This will be an error on PRs." $mp4Link $sizeInBytes }}
{{ else }}
{{ errorf "Size of video file %s was %d kB - please reduce file size" $mp4Link $sizeInBytes }}
{{ end }}
{{ end }}
{{end}}

Expand Down
Binary file added static/platform/provisioning-demo.gif
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified static/platform/provisioning-demo.mp4
Binary file not shown.
Binary file modified static/platform/provisioning-demo.webm
Binary file not shown.
Loading