generated from TBD54566975/tbd-project-template
-
Notifications
You must be signed in to change notification settings - Fork 7
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
cf6f9d5
commit f27a1f3
Showing
5 changed files
with
92 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,78 @@ | ||
VERSION = %(git describe --tags --always --dirty)% | ||
DEST = build | ||
RELEASE = %{DEST}/release | ||
|
||
GO_SOURCES = **/*.go | ||
|
||
|
||
SCHEMA_IN = backend/schema/schema.go backend/schema/protobuf.go \ | ||
cmd/ftl/cmd_schema.go | ||
SCHEMA_OUT = protos/xyz/block/ftl/v1/schema/schema.proto | ||
|
||
PROTO_IN = **/*.proto **/buf.* protos/xyz/block/ftl/v1/schema/schema.proto | ||
PROTO_OUT = protos/xyz/block/ftl/v1/ftlv1connect/ftl.connect.go \ | ||
protos/xyz/block/ftl/v1/schema/schema.pb.go \ | ||
protos/xyz/block/ftl/v1/console/console.pb.go \ | ||
protos/xyz/block/ftl/v1/schema/runtime.pb.go \ | ||
protos/xyz/block/ftl/v1/ftl.pb.go \ | ||
console/client/src/protos/xyz/block/ftl/v1/ftl_connect.ts \ | ||
console/client/src/protos/xyz/block/ftl/v1/schema/schema_pb.ts \ | ||
console/client/src/protos/xyz/block/ftl/v1/schema/runtime_pb.ts \ | ||
console/client/src/protos/xyz/block/ftl/v1/ftl_pb.ts \ | ||
console/client/src/protos/xyz/block/ftl/v1/console/console_pb.ts | ||
|
||
COMMON_LOG_IN = backend/common/log/api.go | ||
COMMON_LOG_OUT = backend/common/log/log_level_string.go | ||
|
||
KT_RUNTIME_IN = kotlin-runtime/ftl-runtime/**/*.{kt,kts} kotlin-runtime/gradle/libs.versions.toml | ||
KT_RUNTIME_OUT = kotlin-runtime/ftl-runtime/build/libs/ftl-runtime.jar | ||
|
||
CLIENT_OUT = console/client/dist/index.html | ||
CLIENT_IN = console/client/**/* | ||
|
||
#virtual release: | ||
# inputs: %{RELEASE}/ftl %{RELEASE}/ftl-controller %{RELEASE}/ftl-runner | ||
|
||
%{RELEASE}: | ||
build: install -m 0700 -d %{OUT} | ||
|
||
# Build all binaries | ||
implicit %{RELEASE}/%{1}: cmd/* | ||
inputs: %{RELEASE} %{GO_SOURCES} | ||
build: go build -o %{OUT} -tags release -ldflags "-X main.version=%{VERSION}" ./cmd/%{1} | ||
|
||
#%{RELEASE}/ftl-controller: %{RELEASE} %{GO_SOURCES} #%{CLIENT_OUT} | ||
# build: go build -o %{OUT} -tags release -ldflags "-X main.version=%{VERSION}" ./cmd/ftl-controller | ||
|
||
%{SCHEMA_OUT}: %{SCHEMA_IN} | ||
build: ftl-schema > %{OUT} | ||
|
||
%{PROTO_OUT}: %{PROTO_IN} | ||
build: | ||
buf format -w | ||
buf lint | ||
(cd protos && buf generate) | ||
(cd backend/common/3rdparty/protos && buf generate) | ||
-clean | ||
|
||
export GRADLE_OPTS = -Dorg.gradle.console=plain | ||
|
||
%{KT_RUNTIME_OUT}: %{KT_RUNTIME_IN} %{PROTO_IN} | ||
cd kotlin-runtime/ftl-runtime | ||
build: gradle jar | ||
+clean: gradle clean | ||
|
||
build/template/ftl/jars: | ||
build: install -m 0700 -d %{OUT} | ||
|
||
build/template/ftl/jars/ftl-runtime.jar: %{KT_RUNTIME_OUT} build/template/ftl/jars | ||
build: install -m 0600 %{KT_RUNTIME_OUT} %{OUT} | ||
|
||
%{COMMON_LOG_OUT}: %{COMMON_LOG_IN} | ||
build: go generate %{IN} | ||
|
||
#%{CLIENT_OUT}: %{CLIENT_IN} | ||
# cd console/client | ||
# build: | ||
# npm install | ||
# npm run build |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
hermit |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
.bit-0.0.1.pkg |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,11 @@ | ||
package main | ||
|
||
import ( | ||
"fmt" | ||
|
||
"github.com/TBD54566975/ftl/backend/schema" | ||
) | ||
|
||
func main() { | ||
fmt.Println(schema.ProtobufSchema()) | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
ftl |