-
Notifications
You must be signed in to change notification settings - Fork 2
Expand file tree
/
Copy pathMakefile
More file actions
62 lines (48 loc) · 1.85 KB
/
Makefile
File metadata and controls
62 lines (48 loc) · 1.85 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
TOPDIR=$(PWD)
ASSETS=$(TOPDIR)/internal/app/assets
tinymce760:
cd $(ASSETS) && \
wget https://download.tiny.cloud/tinymce/community/tinymce_7.6.0.zip && unzip tinymce_7.6.0.zip && \
mv tinymce tinymce_7.6.0 && rm tinymce_7.6.0.zip ; \
bootstrap533:
cd $(ASSETS) && \
wget https://github.com/twbs/bootstrap/releases/download/v5.3.3/bootstrap-5.3.3-dist.zip && unzip bootstrap-5.3.3-dist.zip && \
mv bootstrap-5.3.3-dist bootstrap-5.3.3 && rm bootstrap-5.3.3-dist.zip ; \
bicons1131:
cd $(ASSETS) && \
wget https://github.com/twbs/icons/releases/download/v1.13.1/bootstrap-icons-1.13.1.zip && unzip bootstrap-icons-1.13.1.zip && \
rm bootstrap-icons-1.13.1.zip ; \
without_cdn_build: tinymce760 bootstrap533 bicons1131
cd $(TOPDIR)/internal/app/view/layout && \
mv default.html default.html_ && mv default.nocdn.html default.html && \
mv error.html error.html_ && mv error.nocdn.html error.html && \
\
cd $(TOPDIR)/internal/app/view/edit && \
mv edit_doc.html edit_doc.html_ && mv edit_doc.nocdn.html edit_doc.html && \
\
cd $(TOPDIR) && make build
without_cdn_clear:
cd $(TOPDIR) && \
rm http-here ; \
rm internal/app/view/layout/default.html_ && \
rm internal/app/view/layout/error.html_ && \
rm internal/app/view/edit/edit_doc.html_ && \
\
cd $(ASSETS) && \
rm -rf bootstrap-5.3.3 && \
rm -rf bootstrap-icons-1.13.1 && \
rm -rf tinymce_7.6.0 && \
\
cd $(TOPDIR) && \
git restore internal/app/view/layout && \
git restore internal/app/view/edit
fmt:
go fmt internal/api/* && go fmt internal/app/*.go && go fmt internal/crypt/* && go fmt internal/conf/* && go fmt internal/model2/* && go fmt internal/util/*
tidy:
go mod tidy
run:
go run cmd/http-here/main.go
build:
go build -o http-here -ldflags "-w -s" cmd/http-here/main.go
clear:
rm http-here http-here.exe http-here.darwin.amd64.gz http-here.freebsd.amd64.gz http-here.gz http-here.zip