Skip to content

Commit

Permalink
Merge pull request #82 from beeceej/fix/makefile-compat
Browse files Browse the repository at this point in the history
Fix Issue with `date` and hardcoded bin dir
  • Loading branch information
juliosueiras authored Jul 12, 2020
2 parents a362302 + f78c05b commit 0f374a5
Show file tree
Hide file tree
Showing 2 changed files with 23 additions and 7 deletions.
20 changes: 15 additions & 5 deletions Makefile
Original file line number Diff line number Diff line change
@@ -1,7 +1,17 @@
default:
go build -ldflags "-X main.GitCommit=$$(git rev-list -1 HEAD) -X main.Version=$$(git describe --tags) -X main.Date=$$(date --rfc-3339=date)"
DATE := $$(date +%Y-%m-%dT%T%z)
VERSION := $$(git describe --tags)
COMMIT := $$(git rev-list -1 HEAD)
DST ?= ~/.bin/

copy:
go build -ldflags "-X main.GitCommit=$$(git rev-list -1 HEAD) -X main.Version=$$(git describe --tags) -X main.Date=$$(date --rfc-3339=date)" && cp ./terraform-lsp ~/.bin/ && cp ./terraform-lsp ~/
terraform-lsp:
go build -ldflags "-X main.GitCommit=$(COMMIT) -X main.Version=$(VERSION) -X main.Date=$(DATE)"

.PHONY: copy
copy: terraform-lsp
cp ./terraform-lsp $(DST) && cp ./terraform-lsp ~/

clean:
rm -f terraform-lsp

default: terraform-lsp

.PHONY: clean copy
10 changes: 8 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ This is LSP (Language Server Protocol) for Terraform

**IMPORTANT:** Currently there is two terraform lsp, one is this one and the other one is [terraform-ls](https://github.com/hashicorp/terraform-ls), which contain details about this repo as well.

The aim to have a unified lsp for terraform in the future, but for now there is two concurrent development with collabration to each other, this repo is aim for more experimental features, and the terraform-ls is aim for stableness
The aim to have a unified lsp for terraform in the future, but for now there is two concurrent development with collabration to each other, this repo is aim for more experimental features, and the terraform-ls is aim for stableness

**NOTE:** This is first stage of the plugin, so is experimental

Expand Down Expand Up @@ -48,6 +48,12 @@ make # Build the project. Alternatively run "go build"
make copy # Install the project
```

you may also specify a path to your preferred bin directory with the `DST` parameter

```sh
make copy DST="$your_preferred_bin_path" # Install the project
```

### Nixpkgs

- install nixpkgs
Expand Down Expand Up @@ -101,7 +107,7 @@ All Todos are listed [here](Todo.md)

## Bugs
- Order of completion items
- Issue with block
- Issue with block

## Credits
- LSP structure using [Sourcegraph's go-lsp](https://github.com/sourcegraph/go-lsp)
Expand Down

0 comments on commit 0f374a5

Please # to comment.