Skip to content

Commit 632df9b

Browse files
sapkjolheiser
andauthored
Improve make PR (force build and help message) (#10178)
* Force build of assets * Add make pr to make help * apply @jolheiser suggestion Co-Authored-By: John Olheiser <[email protected]> * Run clean-all before make pr Co-authored-by: John Olheiser <[email protected]>
1 parent 4721d45 commit 632df9b

File tree

2 files changed

+4
-2
lines changed

2 files changed

+4
-2
lines changed

Makefile

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -121,6 +121,7 @@ help:
121121
@echo " - vet examines Go source code and reports suspicious constructs"
122122
@echo " - test run unit test"
123123
@echo " - test-sqlite run integration test for sqlite"
124+
@echo " - pr#<index> build and start gitea from a PR with integration test data loaded"
124125

125126
.PHONY: go-check
126127
go-check:
@@ -565,7 +566,7 @@ generate-images:
565566
$(foreach file, $(shell find public/img -type f -name '*.png' ! -name 'loading.png'),zopflipng -m -y $(file) $(file);)
566567

567568
.PHONY: pr\#%
568-
pr\#%:
569+
pr\#%: clean-all
569570
$(GO) run contrib/pr/checkout.go $*
570571

571572
.PHONY: golangci-lint

contrib/pr/checkout.go

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -247,7 +247,8 @@ func main() {
247247
log.Fatalf("Failed to duplicate this code file in PR : %v", err)
248248
}
249249
}
250-
time.Sleep(5 * time.Second)
250+
//Force build of js, css, bin, ...
251+
runCmd("make", "build")
251252
//Start with integration test
252253
runCmd("go", "run", "-tags", "sqlite sqlite_unlock_notify", codeFilePath, "-run")
253254
}

0 commit comments

Comments
 (0)