mirror of
https://github.com/zyedidia/micro.git
synced 2026-03-29 22:27:13 +09:00
Merge
This commit is contained in:
5
Makefile
5
Makefile
@@ -2,17 +2,18 @@
|
|||||||
|
|
||||||
VERSION = $(shell git describe --tags --abbrev=0)
|
VERSION = $(shell git describe --tags --abbrev=0)
|
||||||
HASH = $(shell git rev-parse --short HEAD)
|
HASH = $(shell git rev-parse --short HEAD)
|
||||||
|
DATE = $(shell go run tools/build-date.go)
|
||||||
|
|
||||||
# Builds micro after checking dependencies but without updating the runtime
|
# Builds micro after checking dependencies but without updating the runtime
|
||||||
build: deps tcell
|
build: deps tcell
|
||||||
go build -ldflags "-X main.Version=$(VERSION) -X main.CommitHash=$(HASH) -X 'main.CompileDate=$(shell date -u '+%B %d, %Y')'" -o micro ./cmd/micro
|
go build -ldflags "-X main.Version=$(VERSION) -X main.CommitHash=$(HASH) -X 'main.CompileDate=$(DATE)'" ./cmd/micro
|
||||||
|
|
||||||
# Builds micro after building the runtime and checking dependencies
|
# Builds micro after building the runtime and checking dependencies
|
||||||
build-all: runtime build
|
build-all: runtime build
|
||||||
|
|
||||||
# Builds micro without checking for dependencies
|
# Builds micro without checking for dependencies
|
||||||
build-quick:
|
build-quick:
|
||||||
go build -ldflags "-X main.Version=$(VERSION) -X main.CommitHash=$(HASH) -X 'main.CompileDate=$(shell date -u '+%B %d, %Y')'" -o micro ./cmd/micro
|
go build -ldflags "-X main.Version=$(VERSION) -X main.CommitHash=$(HASH) -X 'main.CompileDate=$(DATE)'" ./cmd/micro
|
||||||
|
|
||||||
# Same as 'build' but installs to $GOPATH/bin afterward
|
# Same as 'build' but installs to $GOPATH/bin afterward
|
||||||
install: build
|
install: build
|
||||||
|
|||||||
10
tools/build-date.go
Normal file
10
tools/build-date.go
Normal file
@@ -0,0 +1,10 @@
|
|||||||
|
package main
|
||||||
|
|
||||||
|
import (
|
||||||
|
"fmt"
|
||||||
|
"time"
|
||||||
|
)
|
||||||
|
|
||||||
|
func main() {
|
||||||
|
fmt.Println(time.Now().Local().Format("January 02, 2006"))
|
||||||
|
}
|
||||||
Reference in New Issue
Block a user