forked from pixie-io/pixie
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathMakefile
More file actions
33 lines (27 loc) · 1.07 KB
/
Makefile
File metadata and controls
33 lines (27 loc) · 1.07 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
PIXIE_CLI := px
# Update dir name here if you want to add a new directory.
dirs := px sotw pxbeta
script_files := $(foreach dir,$(dirs),$(wildcard $(dir)/**/*))
BUNDLE := gs://pixie-prod-artifacts/script-bundles/bundle-oss.json
EXECUTABLES = $(PIXIE_CLI) gsutil
K := $(foreach exec,$(EXECUTABLES),\
$(if $(shell which $(exec)),some string,$(error "No $(exec) in PATH")))
all: bundle-oss.json.gz
bundle-oss.json: $(script_files) $(PIXIE_CLI)
@$(PIXIE_CLI) create-bundle --search_path $(PWD) $(foreach dir,$(dirs),--base $(dir)) -o $(PWD)/bundle-oss.json
bundle-oss.json.gz: bundle-oss.json
gzip -c $< > $@
.PHONY: update_bundle
update_bundle: bundle-oss.json.gz
# Requires prod access to update, or needs to run in CI deploy.
gsutil -h "Cache-Control:no-cache,max-age=0" \
-h "Content-Type:application/json" \
-h "Content-Encoding: gzip" \
cp $< $(BUNDLE)
# Readable by everyone
gsutil acl ch -u allUsers:READER $(BUNDLE)
update_readme:
./update_readme.py . https://github.com/pixie-labs/pixie/tree/main/pxl_scripts
.PHONY: dev
dev:
./watch.sh