-
Notifications
You must be signed in to change notification settings - Fork 8
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
* feat: refactor to atlas chore: switch to devbox * chore: add generated file test workflow * chore: add devbox script go generation * chore: rename step * chore: update atlas install script * chore: fix issues from staging * chore: lint * chore: do not fail fast seeded workflow * fix: tag descriptions CAN be null * fix: game_version can be null * fix: apparently even downloads can be null * fix: normalize database to match code model * fix: version dependencies should resolve mod ids * chore: lint * chore: remove flaky test * refactor: remove unused indexes fix: return mod_reference in mod_id field again feat: add mod_reference field on version dependency * chore: hash migrations * fix: return correct dependencies on REST endpoint * feat: add mod_reference field to REST endpoint * chore: generate files
- Loading branch information
Showing
80 changed files
with
2,048 additions
and
430 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 |
---|---|---|
@@ -1 +1,7 @@ | ||
use flake | ||
# Automatically sets up your devbox environment whenever you cd into this | ||
# directory via our direnv integration: | ||
|
||
eval "$(devbox generate direnv --print-envrc)" | ||
|
||
# check out https://www.jetpack.io/devbox/docs/ide_configuration/direnv/ | ||
# for more details |
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
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,35 @@ | ||
name: generated | ||
|
||
on: | ||
- push | ||
- pull_request | ||
|
||
jobs: | ||
atlas: | ||
runs-on: ubuntu-latest | ||
steps: | ||
- uses: actions/checkout@v4 | ||
|
||
- name: Install atlas CLI | ||
run: curl -sSf https://atlasgo.sh | sh | ||
|
||
- name: Hash migrations | ||
run: atlas migrate hash --dir "file://migrations/sql?format=golang-migrate" | ||
|
||
- name: Ensure no changes | ||
run: git diff --exit-code | ||
|
||
go: | ||
runs-on: ubuntu-latest | ||
steps: | ||
- uses: actions/checkout@v4 | ||
|
||
- uses: jetify-com/[email protected] | ||
with: | ||
enable-cache: true | ||
|
||
- name: Run generation tasks | ||
run: devbox run generate | ||
|
||
- name: Ensure no changes | ||
run: git diff --exit-code |
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 |
---|---|---|
@@ -1,4 +1,4 @@ | ||
FROM golang:1.22.4-alpine AS builder | ||
FROM golang:1.22.3-alpine AS builder | ||
|
||
RUN apk add --no-cache git build-base libpng-dev protoc | ||
RUN go install google.golang.org/protobuf/cmd/[email protected] | ||
|
@@ -18,7 +18,7 @@ RUN go generate -tags tools -x ./... | |
RUN CGO_ENABLED=1 GOOS=linux GOARCH=amd64 go build -v -a -installsuffix cgo -o /go/bin/api cmd/api/serve.go | ||
|
||
|
||
FROM golang:1.22.4-alpine | ||
FROM golang:1.22.3-alpine | ||
RUN apk add --no-cache libstdc++ libpng | ||
COPY --from=builder /go/bin/api /api | ||
WORKDIR /app | ||
|
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
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
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
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
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
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,18 @@ | ||
package entlogger | ||
|
||
import ( | ||
"context" | ||
"fmt" | ||
|
||
"github.com/Vilsol/slox" | ||
) | ||
|
||
/* | ||
Placed here so our [logging.StackRewriter] can exclude it | ||
*/ | ||
|
||
func EntLogger(ctx context.Context) func(v ...interface{}) { | ||
return func(v ...interface{}) { | ||
slox.Info(ctx, fmt.Sprint(v...)) | ||
} | ||
} |
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
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
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
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
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
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
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
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,44 @@ | ||
{ | ||
"$schema": "https://raw.githubusercontent.com/jetify-com/devbox/0.11.0/.schema/devbox.schema.json", | ||
"packages": [ | ||
"[email protected]", | ||
"[email protected]", | ||
"[email protected]", | ||
"[email protected]", | ||
"[email protected]", | ||
"minio-client@2024-06-10T16-44-15Z", | ||
"[email protected]", | ||
"[email protected]", | ||
"[email protected]", | ||
".#atlas" | ||
], | ||
"shell": { | ||
"scripts": { | ||
"api": "go run cmd/api/serve.go", | ||
"test": "go test -v ./...", | ||
"migrate:diff": [ | ||
"echo -n 'Migration Name: '", | ||
"read migration_name", | ||
"atlas migrate diff \"$migration_name\" --dir \"file://migrations/sql?format=golang-migrate\" --to \"ent://db/schema\" --dev-url \"docker://postgres/16/test?search_path=public\"" | ||
], | ||
"migrate:new": [ | ||
"echo -n 'Migration Name: '", | ||
"read migration_name", | ||
"atlas migrate new \"$migration_name\" --dir \"file://migrations/sql?format=golang-migrate\"" | ||
], | ||
"migrate:hash": [ | ||
"atlas migrate hash --dir \"file://migrations/sql?format=golang-migrate\"" | ||
], | ||
"generate": "go generate -tags tools -x ./...", | ||
"setup": [ | ||
"docker compose up -d && sleep 5", | ||
"mc alias set local http://localhost:9000 minio minio123", | ||
"mc admin user svcacct add local minio --access-key REPLACE_ME_KEY --secret-key REPLACE_ME_SECRET", | ||
"mc anonymous set public local/smr" | ||
], | ||
"teardown": [ | ||
"docker compose down" | ||
] | ||
} | ||
} | ||
} |
Oops, something went wrong.