mirror of
				https://github.com/prometheus/prometheus.git
				synced 2025-10-31 08:21:16 +01:00 
			
		
		
		
	Otherwise the resulting string depends on find, which afaict depends on the underlying filesystem. A stable file list make it easier to detect UI changes in downstreams that need to track UI assets. Signed-off-by: Jan Fajerski <jfajersk@redhat.com>
		
			
				
	
	
		
			17 lines
		
	
	
		
			471 B
		
	
	
	
		
			Bash
		
	
	
		
			Executable File
		
	
	
	
	
			
		
		
	
	
			17 lines
		
	
	
		
			471 B
		
	
	
	
		
			Bash
		
	
	
		
			Executable File
		
	
	
	
	
| #!/usr/bin/env bash
 | |
| #
 | |
| # compress static assets
 | |
| 
 | |
| set -euo pipefail
 | |
| 
 | |
| cd web/ui
 | |
| cp embed.go.tmpl embed.go
 | |
| 
 | |
| GZIP_OPTS="-fk"
 | |
| # gzip option '-k' may not always exist in the latest gzip available on different distros.
 | |
| if ! gzip -k -h &>/dev/null; then GZIP_OPTS="-f"; fi
 | |
| 
 | |
| find static -type f -name '*.gz' -delete
 | |
| find static -type f -exec gzip $GZIP_OPTS '{}' \; -print0 | xargs -0 -I % echo %.gz | sort | xargs echo //go:embed >> embed.go
 | |
| echo var EmbedFS embed.FS >> embed.go
 |