Skip to content

Commit

Permalink
updated the script for checking build process
Browse files Browse the repository at this point in the history
Signed-off-by: Dipankar Das <[email protected]>
  • Loading branch information
dipankardas011 committed Feb 9, 2025
1 parent 9f6e52a commit af00b63
Show file tree
Hide file tree
Showing 2 changed files with 14 additions and 9 deletions.
12 changes: 3 additions & 9 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -22,25 +22,19 @@ gen-docs: ## Generates docs
install_linux: ## Install ksctl
@echo "Started to Install ksctl"
cd scripts && \
env GOOS=${GOOS_LINUX} GOARCH=${GOARCH_LINUX} go build -o ksctl -v ../ && \
sudo mv ksctl /usr/local/bin/ && \
ksctl version
env GOOS=${GOOS_LINUX} GOARCH=${GOARCH_LINUX} ./builder.sh

.PHONY: install_macos
install_macos: ## Install ksctl on macos m1,m2,..
@echo "Started to Install ksctl"
cd scripts && \
env GOOS=${GOOS_MACOS} GOARCH=${GOARCH_MACOS} go build -o /usr/local/bin/ksctl -v ../ && \
sudo mv ksctl /usr/local/bin/ && \
ksctl version
env GOOS=${GOOS_MACOS} GOARCH=${GOARCH_MACOS} ./builder.sh

.PHONY: install_macos_intel
install_macos_intel: ## Install ksctl on macos intel
@echo "Started to Install ksctl"
cd scripts && \
env GOOS=${GOOS_MACOS} GOARCH=${GOARCH_MACOS_INTEL} go build -o /usr/local/bin/ksctl -v ../ && \
sudo mv ksctl /usr/local/bin/ && \
ksctl version
env GOOS=${GOOS_MACOS} GOARCH=${GOARCH_MACOS_INTEL} ./builder.sh

.PHONY: uninstall
uninstall: ## Uninstall ksctl
Expand Down
11 changes: 11 additions & 0 deletions scripts/builder.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
#!/bin/bash

cd .. || echo -e "\033[1;31mUnable to cd into ksctl root\033[0m\n"

go get -d
go build -v -o ksctl .
chmod +x ksctl

sudo mv -v ksctl /usr/local/bin/ksctl

echo -e "\033[1;32mINSTALL COMPLETE\033[0m\n"

0 comments on commit af00b63

Please sign in to comment.