From d289a80e4c6edb4d6ef55fff148cec0f3832f1df Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?M=C3=A1ximo=20Cuadros?= Date: Wed, 5 Apr 2017 18:38:42 +0200 Subject: [PATCH] Makefile go generate base --- Makefile | 16 ++++++++++++---- content.go | 2 +- generate.go | 2 +- languages.go | 2 +- 4 files changed, 15 insertions(+), 7 deletions(-) diff --git a/Makefile b/Makefile index 47bea3f..8a172ca 100644 --- a/Makefile +++ b/Makefile @@ -1,5 +1,13 @@ -samples: - git clone git@github.com:github/linguist.git .linguist\ +LINGUIST_PATH = .linguist -test: samples - go test -v ./... \ No newline at end of file +$(LINGUIST_PATH): + git clone git@github.com:github/linguist.git $@ + +test: $(LINGUIST_PATH) + go test -v ./... + +code-generate: $(LINGUIST_PATH) + go run internal/code-generator/main.go + +clean: + rm -rf $(LINGUIST_PATH) \ No newline at end of file diff --git a/content.go b/content.go index 074fe9b..7f7560e 100644 --- a/content.go +++ b/content.go @@ -2,7 +2,7 @@ package slinguist // CODE GENERATED AUTOMATICALLY WITH github.com/src-d/simple-linguist/cli/slinguist-generate // THIS FILE SHOULD NOT BE EDITED BY HAND -// Extracted from github/linguist commit: 8b2d15a2d527c363dead3efe5e4dc3cb74fa4613 +// Extracted from github/linguist commit: 3a2a62baad5363a604828706f8df730902a542b0 import ( "path/filepath" diff --git a/generate.go b/generate.go index 2cb7ea1..32d8592 100644 --- a/generate.go +++ b/generate.go @@ -1,3 +1,3 @@ package slinguist -//go:generate go run internal/code-generator/main.go +//go:generate make code-generate diff --git a/languages.go b/languages.go index 6a38687..8f534a7 100644 --- a/languages.go +++ b/languages.go @@ -2,7 +2,7 @@ package slinguist // CODE GENERATED AUTOMATICALLY WITH github.com/src-d/simple-linguist/cli/slinguist-generate // THIS FILE SHOULD NOT BE EDITED BY HAND -// Extracted from github/linguist commit: 8b2d15a2d527c363dead3efe5e4dc3cb74fa4613 +// Extracted from github/linguist commit: 3a2a62baad5363a604828706f8df730902a542b0 var languagesByExtension = map[string][]string{ ".1": {"Roff"},