Skip to content

Commit

Permalink
Update Vagrantfile and Makefile
Browse files Browse the repository at this point in the history
  • Loading branch information
mtardy committed Apr 21, 2022
1 parent 2f32999 commit aa01b99
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 5 deletions.
5 changes: 4 additions & 1 deletion Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -26,13 +26,16 @@ LDFLAGS="-s -w \
build: lint
CGO_ENABLED=0 GOOS=$(GOOS) GOARCH=$(GOARCH) go build -ldflags $(LDFLAGS) -o $(OUTPUTNAME)

fast-build:
CGO_ENABLED=0 GOOS=$(GOOS) GOARCH=$(GOARCH) go build -ldflags $(LDFLAGS) -o $(OUTPUTNAME)

.PHONY: lint
lint:
golangci-lint run

DEV_IMAGE_TAG=mtardy/kdigger-dev
.PHONY: run
run:
run: fast-build
echo "FROM mtardy/koolbox\nCOPY kdigger /usr/local/bin/kdigger" | docker build -t $(DEV_IMAGE_TAG) -f- .
kind load docker-image $(DEV_IMAGE_TAG)
kubectl run kdigger-dev-tmp --rm -i --tty --image $(DEV_IMAGE_TAG) --image-pull-policy Never -- bash
Expand Down
7 changes: 3 additions & 4 deletions Vagrantfile
Original file line number Diff line number Diff line change
Expand Up @@ -2,10 +2,9 @@
# vi: set ft=ruby :

Vagrant.configure("2") do |config|
config.vm.box = "debian/bullseye64"
config.vm.box = "generic/ubuntu2004"
config.vm.hostname = "kdigger"
config.vm.define "kdigger"
config.vagrant.plugins = ['vagrant-vbguest']

config.vm.network "private_network", type: "dhcp"

Expand All @@ -21,9 +20,9 @@ Vagrant.configure("2") do |config|

config.vm.provision "shell", inline: <<-SHELL
apt-get update
apt-get install -y build-essential curl vim zsh git
apt-get install -y build-essential curl neovim zsh git
GO_VERSION=1.17.3
GO_VERSION=1.18.1
echo "Install Go $GO_VERSION"
curl -OL https://golang.org/dl/go$GO_VERSION.linux-amd64.tar.gz
rm -rf /usr/local/go && tar -C /usr/local -xzf go$GO_VERSION.linux-amd64.tar.gz
Expand Down

0 comments on commit aa01b99

Please sign in to comment.