Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

feat: Add Makefile to project #2

Merged
merged 2 commits into from
Dec 14, 2023
Merged
Show file tree
Hide file tree
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
45 changes: 45 additions & 0 deletions Makefile
Original file line number Diff line number Diff line change
@@ -0,0 +1,45 @@
NAME=slick
VERSION=0.0.1

.DEFAULT_GOAL := help

.PHONY: build
## build: Compile the packages.
build:
@go build -v -o bin/$(NAME) cmd/$(NAME)/main.go

.PHONY: install
## install: Install the packages.
install: build
@mv bin/$(NAME) $(GOPATH)/bin/$(NAME)

.PHONY: clean
## clean: Clean projects and previous builds
clean:
@rm -rf bin/*

.PHONY: deps
## deps: Download modules
deps:
@go mod download

.PHONY: watch
## watch: Reload the app whenever the source changes
watch:
@which reflex > /dev/null || (go install github.com/cespare/reflex@latest)
reflex -s -r '\.go$$' make run

.PHONY: test
## test: Run all tests
test:
@go test -v ./...

.PHONY: help
all: help
## help: show this help message
help: Makefile
@echo
@echo " Choose a command to run:"
@echo
@sed -n 's/^##//p' $< | column -t -s ':' | sed -e 's/^/ /'
@echo
4 changes: 1 addition & 3 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -42,11 +42,9 @@ To start using Slick Deploy, install it right from the source:
```bash
git clone https://github.com/scmmishra/slick-deploy.git
cd slick-deploy
go build -o slick ./cmd/slick
make install
```

You can now move the slick binary to a directory in your PATH to make it globally accessible.

### Usage

To deploy an application:
Expand Down
Loading