Skip to content
Open
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
2 changes: 1 addition & 1 deletion Tiltfile
Original file line number Diff line number Diff line change
Expand Up @@ -103,7 +103,7 @@ local_resource(

local_resource(
"restic_binary",
cmd = 'cd ' + '.' + ';mkdir -p _tiltbuild/restic; BIN=velero GOOS=linux GOARCH=amd64 GOARM="" RESTIC_VERSION=0.13.1 OUTPUT_DIR=_tiltbuild/restic ./hack/build-restic.sh',
cmd = 'cd ' + '.' + ';rm -rf ../restic; BIN=velero GOOS=linux GOARCH=amd64 GOARM="" RESTIC_VERSION=0.13.1 OUTPUT_DIR=../velero/_tiltbuild/restic ./hack/build-restic.sh',
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I'm not sure we'd want to run rm -rf without confirmation.

If your $PWD is /git/velero and you have /git/restic as well wouldn't this command delete restic dir outside of velero repo?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

yes, you're right about the concern, I don't think rm -f should be in this file when it removes outside files. Maybe we need to change the restic download shell script and let all the thing under the Velero repo is good.

The origin reason is someone committed ./hack/build-restic.sh, and don't notice the file was also used by tilt up, so broke the restic download behavior in tilt up.

I suggest creating a new hack script for tilt to download the restic file, although there would be some redundant code.

Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

could nest this under Makefile target ./path/to/restic/code:
and then add this path to gitignore.

)

# Note: we need a distro with a bash shell to exec into the Velero container
Expand Down