Skip to content

Commit

Permalink
chore: update .air.toml, .gitignore, and Makefile for new tmp directo…
Browse files Browse the repository at this point in the history
…ry structure

- .air.toml: Removed 'dist' from exclude_dir
- .gitignore: Removed 'dist/' from ignored directories
- Makefile: Changed build output from 'dist' to 'tmp/dist'
- Deleted: API .gitkeep files
- Added: API deployment files 'bruno.json', 'development.bru', and 'health-check.bru'
  • Loading branch information
eser committed Aug 31, 2024
1 parent 81f6911 commit 6059562
Show file tree
Hide file tree
Showing 9 changed files with 42 additions and 11 deletions.
2 changes: 1 addition & 1 deletion .air.toml
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ tmp_dir = "tmp"
bin = "./tmp/service-cli"
cmd = "go build -o ./tmp/service-cli ./cmd/service-cli/"
delay = 1000
exclude_dir = ["dist", "tmp", "vendor", "testdata"]
exclude_dir = ["tmp", "vendor", "testdata"]
exclude_file = []
exclude_regex = ["_test.go"]
exclude_unchanged = false
Expand Down
2 changes: 0 additions & 2 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -40,5 +40,3 @@ __debug_bin*
build-errors.log
/tmp/*
!/tmp/.gitkeep
/dist/*
!/dist/.gitkeep
16 changes: 8 additions & 8 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -8,18 +8,18 @@ dev:
air

build:
go build -o ./dist/${BINARY_NAME} ./cmd/${BINARY_NAME}/
go build -o ./tmp/dist/${BINARY_NAME} ./cmd/${BINARY_NAME}/

multiarch-build:
GOARCH=amd64 GOOS=darwin go build -o ./dist/${BINARY_NAME}-darwin-amd64 ./cmd/${BINARY_NAME}
GOARCH=amd64 GOOS=linux go build -o ./dist/${BINARY_NAME}-linux-amd64 ./cmd/${BINARY_NAME}
GOARCH=amd64 GOOS=windows go build -o ./dist/${BINARY_NAME}-windows-amd64 ./cmd/${BINARY_NAME}
GOARCH=arm64 GOOS=darwin go build -o ./dist/${BINARY_NAME}-darwin-arm64 ./cmd/${BINARY_NAME}
GOARCH=arm64 GOOS=linux go build -o ./dist/${BINARY_NAME}-linux-arm64 ./cmd/${BINARY_NAME}
GOARCH=arm64 GOOS=windows go build -o ./dist/${BINARY_NAME}-windows-arm64 ./cmd/${BINARY_NAME}
GOARCH=amd64 GOOS=darwin go build -o ./tmp/dist/${BINARY_NAME}-darwin-amd64 ./cmd/${BINARY_NAME}
GOARCH=amd64 GOOS=linux go build -o ./tmp/dist/${BINARY_NAME}-linux-amd64 ./cmd/${BINARY_NAME}
GOARCH=amd64 GOOS=windows go build -o ./tmp/dist/${BINARY_NAME}-windows-amd64 ./cmd/${BINARY_NAME}
GOARCH=arm64 GOOS=darwin go build -o ./tmp/dist/${BINARY_NAME}-darwin-arm64 ./cmd/${BINARY_NAME}
GOARCH=arm64 GOOS=linux go build -o ./tmp/dist/${BINARY_NAME}-linux-arm64 ./cmd/${BINARY_NAME}
GOARCH=arm64 GOOS=windows go build -o ./tmp/dist/${BINARY_NAME}-windows-arm64 ./cmd/${BINARY_NAME}

run: build
./dist/${BINARY_NAME}
./tmp/dist/${BINARY_NAME}

clean:
go clean
Expand Down
Empty file removed api/.gitkeep
Empty file.
Empty file removed api/openapi-spec/.gitkeep
Empty file.
9 changes: 9 additions & 0 deletions deployments/api/bruno.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
{
"version": "1",
"name": "golang-service-template",
"type": "collection",
"ignore": [
"tmp",
".git"
]
}
3 changes: 3 additions & 0 deletions deployments/api/environments/development.bru
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
vars {
baseuri: http://localhost:8080
}
21 changes: 21 additions & 0 deletions deployments/api/health-check.bru
Original file line number Diff line number Diff line change
@@ -0,0 +1,21 @@
meta {
name: Health Check
type: http
seq: 1
}

get {
url: {{baseuri}}/health-check
body: none
auth: none
}

assert {
res.status: 204
}

tests {
test("status code is 204", function() {
expect(res.status).equal(204);
});
}
Empty file removed dist/.gitkeep
Empty file.

0 comments on commit 6059562

Please sign in to comment.