Skip to content

Commit

Permalink
fix: add missing go.work.tmpl files
Browse files Browse the repository at this point in the history
  • Loading branch information
alecthomas committed Jan 15, 2024
1 parent dcf2a2d commit 4542661
Show file tree
Hide file tree
Showing 9 changed files with 30 additions and 16 deletions.
6 changes: 3 additions & 3 deletions .github/workflows/release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -112,9 +112,9 @@ jobs:
cache: "maven"
- name: Publish JARs # Snapshots are published first, then the tagged release
run: |
mvn -U --batch-mode clean deploy -P release
mvn --batch-mode versions:set -DnewVersion=$(git describe --tags --abbrev=0 | cut -c2-) -DprocessAllModules -DgenerateBackupPoms=false
mvn -U --batch-mode clean deploy -P release
mvn -U -B clean deploy -P release
mvn -B versions:set -DnewVersion=$(git describe --tags --abbrev=0 | cut -c2-) -DprocessAllModules -DgenerateBackupPoms=false
mvn -U -B clean deploy -P release
git clean -f *.flattened_pom.xml
env:
SIGN_KEY_PASS: ${{ secrets.GPG_PASSPHRASE }}
Expand Down
3 changes: 2 additions & 1 deletion .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -14,4 +14,5 @@ generated_ftl_module.go
*.zip
dist/
examples/**/_ftl/
go.work*
examples/**/go.work
examples/**/go.work.sum
12 changes: 6 additions & 6 deletions Bitfile
Original file line number Diff line number Diff line change
Expand Up @@ -118,15 +118,15 @@ kotlin-runtime/scaffolding.zip: kotlin-runtime/scaffolding/**/*

%{KT_RUNTIME_OUT}: %{KT_RUNTIME_IN} %{PROTO_IN}
build:
mvn -N install
mvn -pl :ftl-runtime install
+clean: mvn -pl :ftl-runtime clean
mvn -B -N install
mvn -B -pl :ftl-runtime install
+clean: mvn -B -pl :ftl-runtime clean

%{KT_GENERATOR_OUT}: %{KT_GENERATOR_IN}
build:
mvn -N install
mvn -pl :ftl-generator install
+clean: mvn -pl :ftl-generator clean
mvn -B -N install
mvn -B -pl :ftl-generator install
+clean: mvn -B -pl :ftl-generator clean

%(dirname %{KT_RUNTIME_RUNNER_TEMPLATE_OUT})%:
build: install -m 0700 -d %{OUT}
Expand Down
2 changes: 1 addition & 1 deletion Dockerfile.controller
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ WORKDIR /src

# Seed some of the most common tools - this will be cached
RUN go version
RUN mvn --version
RUN mvn -B --version

# Download Go dependencies separately so Docker will cache them
COPY go.mod go.sum ./
Expand Down
2 changes: 1 addition & 1 deletion Dockerfile.runner
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ RUN hermit install openjre-18.0.2.1_1
RUN hermit uninstall openjre
RUN hermit install jbr
RUN go version
RUN mvn --version
RUN mvn -B --version

WORKDIR /src

Expand Down
6 changes: 3 additions & 3 deletions Justfile
Original file line number Diff line number Diff line change
Expand Up @@ -3,15 +3,15 @@ install-jars: install-root-jar install-generator-jar install-runtime-jar

# Install root JAR to local Maven repository
install-root-jar:
mvn install
mvn -B install

# Install ftl-generator JAR to local Maven repository
install-generator-jar:
mvn -pl :ftl-generator install
mvn -B -pl :ftl-generator install

# Install ftl-runtime JAR to local Maven repository
install-runtime-jar:
mvn -pl :ftl-runtime install
mvn -B -pl :ftl-runtime install

# Deploy the Go time module
deploy-time:
Expand Down
2 changes: 1 addition & 1 deletion backend/common/moduleconfig/config.go
Original file line number Diff line number Diff line change
Expand Up @@ -53,7 +53,7 @@ func setConfigDefaults(moduleDir string, config *ModuleConfig) error {
switch config.Language {
case "kotlin":
if config.Build == "" {
config.Build = "mvn --batch-mode compile"
config.Build = "mvn -B compile"
}
if config.DeployDir == "" {
config.DeployDir = "target"
Expand Down
7 changes: 7 additions & 0 deletions go-runtime/compile/build-template/go.work.tmpl
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
go 1.21.6

use (
.
_ftl/go/modules
_ftl/go/main
)
6 changes: 6 additions & 0 deletions go-runtime/compile/external-module-template/go.work.tmpl
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
go 1.21.6

use (
.
_ftl/go/modules
)

0 comments on commit 4542661

Please sign in to comment.