File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change 11repos
22bin
33pkg /statik
4+ smithy.yml
5+ smithy
Original file line number Diff line number Diff line change 11BUILD_VERSION ?= $(shell git describe --always --abbrev=40 --dirty)
22
3+ PREFIX? =/usr/local
4+ BINDIR? =$(PREFIX ) /bin
5+ SHAREDIR? =$(PREFIX ) /share/smithy
6+
37LDFLAGS ="-X github.com/honza/smithy/cmd.SmithyVersion=${BUILD_VERSION}"
48MODCACHE := $(shell go env GOMODCACHE)
59
610export CGO_ENABLED =0
711
8- all : bin/statik
12+ all : smithy smithy.yml
13+
14+ smithy : bin/statik
915 bin/statik -src=include -dest=pkg -f -m
1016 go build -ldflags $(LDFLAGS ) -o smithy main.go
1117
18+ smithy.yml :
19+ ./smithy generate > smithy.yml
20+
21+ install : all
22+ mkdir -m755 -p $(DESTDIR )$(BINDIR ) $(DESTDIR )$(SHAREDIR )
23+ install -m755 smithy $(DESTDIR )$(BINDIR ) /smithy
24+ install -m644 smithy.yml $(DESTDIR )$(SHAREDIR ) /smithy.yml
25+
26+ uninstall : all
27+ rm -r $(DESTDIR )$(BINDIR ) /smithy
28+ rm -fr $(DESTDIR )$(SHAREDIR )
29+
1230bin/statik :
1331 mkdir -p bin
1432 go mod download
1836 go fmt ./pkg/... ./cmd/...
1937
2038clean :
21- rm smithy
39+ rm smithy smithy.yml
2240 rm -rf pkg/statik
41+
42+ .PHONY :
43+ smithy smithy.yml clean
Original file line number Diff line number Diff line change @@ -30,14 +30,29 @@ $ ./smithy --help
3030Installing
3131-------------------------------------------------------------------------------
3232
33+ We provide a make rule for installing/uninstall smithy. It will also install a
34+ sample configuration file at ` /usr/local/share/smithy/smithy.yml ` that you can
35+ later use as a guide.
36+
3337```
34- $ smithy generate > config.yml
35- $ smithy serve --config config.yml
38+ $ make install
39+ $ make uninstall
3640```
3741
3842Configuration
3943-------------------------------------------------------------------------------
4044
45+ You can generate a sample configuration by issuing ` make smithy.yml ` command or
46+ directly using the smithy binary:
47+
48+ ```
49+ $ make smithy.yml # will generate a smithy.yml file
50+ $ smithy generate > config.yml
51+ $ smithy serve --config config.yml
52+ ```
53+
54+ A sample configuration can be:
55+
4156``` yaml
4257title : Smithy, a lightweight git forge
4358description : Publish your git repositories with ease
You can’t perform that action at this time.
0 commit comments