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

Akia code patch makefile #295

Merged
merged 4 commits into from
Jan 24, 2022
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
14 changes: 10 additions & 4 deletions Makefile
Original file line number Diff line number Diff line change
@@ -1,18 +1,24 @@
YORKIE_VERSION := 0.2.2

GIT_COMMIT := $(shell git rev-parse --short HEAD)
BUILD_DATE := $(shell date "+%Y-%m-%d")
GO_PROJECT = github.com/yorkie-team/yorkie
GO_SRC := $(shell find . -path ./vendor -prune -o -type f -name '*.go' -print)

ifeq ($(OS),Windows_NT)
BUILD_DATE := $(shell echo %date:~6,4%-%date:~0,2%-%date:~3,2%)
GO_SRC := $(shell dir /s /b *.go | findstr /v "vendor")
EXECUTABLE = ./bin/yorkie.exe
else
BUILD_DATE := $(shell date "+%Y-%m-%d")
GO_SRC := $(shell find . -path ./vendor -prune -o -type f -name '*.go' -print)
EXECUTABLE = ./bin/yorkie
endif

# inject the version number into the golang version package using the -X linker flag
GO_LDFLAGS ?=
GO_LDFLAGS += -X ${GO_PROJECT}/internal/version.GitCommit=${GIT_COMMIT}
GO_LDFLAGS += -X ${GO_PROJECT}/internal/version.Version=${YORKIE_VERSION}
GO_LDFLAGS += -X ${GO_PROJECT}/internal/version.BuildDate=${BUILD_DATE}

EXECUTABLE = ./bin/yorkie

tools:
go generate -tags tools tools/tools.go

Expand Down
4 changes: 2 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
# Yorkie

[![Github](https://img.shields.io/github/stars/yorkie-team/yorkie.svg?style=social)](https://github.com/yorkie-team/yorkie)
[![GitHub](https://img.shields.io/github/stars/yorkie-team/yorkie.svg?style=social)](https://github.com/yorkie-team/yorkie)
[![Twitter](https://img.shields.io/twitter/follow/team_yorkie.svg?label=Follow)](https://twitter.com/team_yorkie)
[![Slack](https://img.shields.io/badge/chat-on%20Slack-brightgreen.svg?style=social&logo=slack)](https://dev-yorkie.slack.com/)
[![Contributors](https://img.shields.io/github/contributors/yorkie-team/yorkie.svg)](https://github.com/yorkie-team/yorkie/contributors)
Expand Down Expand Up @@ -63,7 +63,7 @@ Next, clone this repository into some local directory and then just type `make b
```
$ make build
...
$ bin/yorkie
$ bin/yorkie # For Windows, .\bin\yorkie.exe
```

> We need to install Golang packages to build Yorkie locally. You can run `make tools` to install the required packages.
Expand Down