File tree Expand file tree Collapse file tree 2 files changed +16
-1
lines changed Expand file tree Collapse file tree 2 files changed +16
-1
lines changed Original file line number Diff line number Diff line change @@ -524,7 +524,7 @@ $(EXECUTABLE): $(GO_SOURCES) $(TAGS_PREREQ)
524
524
CGO_CFLAGS=" $( CGO_CFLAGS) " $(GO ) build -mod=vendor $(GOFLAGS ) $(EXTRA_GOFLAGS ) -tags ' $(TAGS)' -ldflags ' -s -w $(LDFLAGS)' -o $@
525
525
526
526
.PHONY : release
527
- release : frontend generate release-windows release-linux release-darwin release-copy release-compress release-sources release-check
527
+ release : frontend generate release-windows release-linux release-darwin release-copy release-compress release-sources release-docs release- check
528
528
529
529
$(DIST_DIRS ) :
530
530
mkdir -p $(DIST_DIRS )
@@ -580,6 +580,17 @@ release-sources: | $(DIST_DIRS) node_modules
580
580
tar --exclude=./$(DIST ) --exclude=./.git --exclude=./$(MAKE_EVIDENCE_DIR ) --exclude=./node_modules/.cache -czf $(DIST ) /release/gitea-src-$(VERSION ) .tar.gz .
581
581
rm -f $(STORED_VERSION_FILE )
582
582
583
+ .PHONY : release-docs
584
+ release-docs : | $(DIST_DIRS ) docs
585
+ tar -czf $(DIST ) /release/gitea-docs-$(VERSION ) .tar.gz -C ./docs/public .
586
+
587
+ .PHONY : docs
588
+ docs :
589
+ @hash hugo > /dev/null 2>&1 ; if [ $$ ? -ne 0 ]; then \
590
+ GO111MODULE=off $(GO ) get -u github.com/gohugoio/hugo; \
591
+ fi
592
+ cd docs; make trans-copy clean build-offline;
593
+
583
594
node_modules : package-lock.json
584
595
npm install --no-save
585
596
@touch node_modules
Original file line number Diff line number Diff line change @@ -21,6 +21,10 @@ server: $(THEME)
21
21
build : $(THEME )
22
22
hugo --cleanDestinationDir
23
23
24
+ .PHONY : build-offline
25
+ build-offline : $(THEME )
26
+ hugo --baseURL=" /" --cleanDestinationDir
27
+
24
28
.PHONY : update
25
29
update : $(THEME )
26
30
You can’t perform that action at this time.
0 commit comments