Skip to content

Commit

Permalink
Wercker + Docker + Version bump
Browse files Browse the repository at this point in the history
  • Loading branch information
LukeHandle committed Aug 3, 2018
1 parent 9ebbb59 commit 6f11754
Show file tree
Hide file tree
Showing 6 changed files with 23 additions and 20 deletions.
6 changes: 3 additions & 3 deletions Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -3,14 +3,14 @@ FROM golang:alpine AS builder
WORKDIR /go/src/github.com/minotar/imgd
COPY . .
RUN apk add --no-cache git
RUN go-wrapper download # "go get -d -v ./..."
RUN go-wrapper install # "go install -v ./..."
RUN go get -d -v ./...
RUN go install -v ./...

#final stage
FROM alpine:latest
RUN apk --no-cache add ca-certificates
COPY --from=builder /go/bin/imgd /imgd
COPY config.example.gcfg /config.gcfg
ENTRYPOINT ./imgd
LABEL Name=imgd Version=2.11.0
LABEL Name=imgd Version=3.0.0
EXPOSE 8000
20 changes: 10 additions & 10 deletions http_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -59,43 +59,43 @@ func TestHTTPMockVersion(t *testing.T) {
workingUsernames := []string{
"clone1018",
"citricsquid",
"404stexture",
}
// Manually add the Steve hash for the 404stexture user
mockminecraft.TexturesHash["/texture/404Texture"] = "98903c1609352e11552dca79eb1ce3d6"
avatarHash := map[string]string{
"clone1018": "71bdaacd85812af7cd7f4226c6c91c43",
"citricsquid": "91ae8bcc4f238ede2e234e685a7009fb",
"404stexture": "35021cc9febae6e275a3212b8c6afc51",
}
cubeHash := map[string]string{
"clone1018": "a9055bca4a27c0ef7b2bc511e18c7576",
"citricsquid": "0fe263aef4b749c58e42a9089a416154",
"404stexture": "77c6e031b9df248964a50ae7fb935a7a",
}
bustHash := map[string]string{
"clone1018": "725ddd51b55b15db173279694df43d5d",
"citricsquid": "94d506fe4846b01d033c22ac509e1dc7",
"404stexture": "3cef88fe7bc87c8f75378ecc3e8133c4",
}
bodyHash := map[string]string{
"clone1018": "3e8ee3e1ed24f685820625cf80c12432",
"citricsquid": "eed549817c360c77ac2aa3201e51aa1c",
}
armorBustHash := map[string]string{
"clone1018": "725ddd51b55b15db173279694df43d5d",
"citricsquid": "94d506fe4846b01d033c22ac509e1dc7",
}
armorBodyHash := map[string]string{
"clone1018": "3e8ee3e1ed24f685820625cf80c12432",
"citricsquid": "eed549817c360c77ac2aa3201e51aa1c",
"404stexture": "d921d3646a62b0617f1a3767560ca877",
}
downloadHash := map[string]string{
"clone1018": "602026c3174c3ba63737e4b82675afa8",
"citricsquid": "37afc5d1a03364dc554e2f5859ac461d",
"404stexture": "97d1b39ad94b896faff826cb93d45c98",
}
resourceHashes := map[string]map[string]string{
"avatar": avatarHash,
"helm": avatarHash,
"cube": cubeHash,
"bust": bustHash,
"body": bodyHash,
"armor/bust": armorBustHash,
"armor/body": armorBodyHash,
"armor/bust": bustHash,
"armor/body": bodyHash,
"skin": downloadHash,
"download": downloadHash,
}
Expand Down
2 changes: 1 addition & 1 deletion main.go
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@ const (
MinWidth = uint(8)
MaxWidth = uint(300)

ImgdVersion = "2.11.0"
ImgdVersion = "3.0.0"
)

var (
Expand Down
2 changes: 1 addition & 1 deletion skin.go
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,7 @@ const (
uuidRateLimitTTL = 1 * time.Hour
uuidErrorTTL = 30 * time.Minute

skinTTL = 30 * day
skinTTL = 1 * time.Hour
skinErrorTTL = 15 * time.Minute

metaUnknownCode = "204"
Expand Down
1 change: 1 addition & 0 deletions storage/util/benchmark/bench.go
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
package bench
12 changes: 7 additions & 5 deletions wercker.yml
Original file line number Diff line number Diff line change
Expand Up @@ -20,14 +20,16 @@ build:
- script:
name: go build
code: |
GOOS=linux GOARCH=amd64 go build -o $WERCKER_OUTPUT_DIR/imgd_linux_amd64 ./...
GOOS=darwin GOARCH=amd64 go build -o $WERCKER_OUTPUT_DIR/imgd_darwin_amd64 ./...
GOOS=linux GOARCH=amd64 go build -o $WERCKER_OUTPUT_DIR/imgd_linux_amd64
GOOS=darwin GOARCH=amd64 go build -o $WERCKER_OUTPUT_DIR/imgd_darwin_amd64
# Test the project
- script:
name: go test
code: |
go test ./...
# If we don't pull in sub-packages imports, then this will fail
# go test ./...
go test
release:
steps:
Expand All @@ -40,8 +42,8 @@ release:
# Should ideally use some intelligence to get version, eg $(./imgd -version) would be cool
- github-create-release:
token: $GITHUB_TOKEN
tag: 2.11.0
title: imgd 2.11.0
tag: 3.0.0
title: imgd 3.0.0
draft: true

- github-upload-asset:
Expand Down

0 comments on commit 6f11754

Please sign in to comment.