Skip to content

Commit

Permalink
Merge branch 'dev' into alpha
Browse files Browse the repository at this point in the history
  • Loading branch information
alimy committed Aug 23, 2024
2 parents 990a908 + 2f8e6f0 commit 4c66694
Show file tree
Hide file tree
Showing 28 changed files with 297 additions and 231 deletions.
6 changes: 3 additions & 3 deletions Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -22,9 +22,9 @@ ARG USE_DIST=no
WORKDIR /paopao-ce
COPY . .
COPY --from=frontend /web/dist ./web/dist
ENV GOPROXY=https://goproxy.cn
RUN [ $EMBED_UI != yes ] || make build TAGS='go_json'
RUN [ $EMBED_UI = yes ] || make build TAGS='slim embed go_json'
ENV GOPROXY=https://goproxy.cn,direct
RUN --mount=type=cache,target=$GOPATH/go/pkg,id=paopao-ce-gopkg [ $EMBED_UI != yes ] || make buildx TAGS='go_json'
RUN --mount=type=cache,target=$GOPATH/go/pkg,id=paopao-ce-gopkg [ $EMBED_UI = yes ] || make buildx TAGS='slim embed go_json'

FROM bitbus/paopao-ce-backend-runner:latest
ARG API_HOST
Expand Down
6 changes: 3 additions & 3 deletions Dockerfile.allinone
Original file line number Diff line number Diff line change
Expand Up @@ -22,9 +22,9 @@ ARG USE_DIST=no
WORKDIR /paopao-ce
COPY . .
COPY --from=frontend /web/dist ./web/dist
ENV GOPROXY=https://goproxy.cn
RUN [ $EMBED_UI != yes ] || make build TAGS='go_json migration'
RUN [ $EMBED_UI = yes ] || make build TAGS='slim embed go_json migration'
ENV GOPROXY=https://goproxy.cn,direct
RUN --mount=type=cache,target=$GOPATH/go/pkg,id=paopao-ce-gopkg [ $EMBED_UI != yes ] || make buildx TAGS='go_json migration'
RUN --mount=type=cache,target=$GOPATH/go/pkg,id=paopao-ce-gopkg [ $EMBED_UI = yes ] || make buildx TAGS='slim embed go_json migration'

FROM bitbus/paopao-ce-allinone-runner:latest
ARG API_HOST
Expand Down
4 changes: 4 additions & 0 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -32,6 +32,10 @@ LDFLAGS = -X "${MOD_NAME}/pkg/version.version=${BUILD_VERSION}" \
all: fmt build

build:
@echo Build paopao-ce
@go build -pgo=auto -trimpath -tags '$(TAGS)' -ldflags '$(LDFLAGS)' -o $(RELEASE_ROOT)/$(TARGET)

buildx:
@go mod download
@echo Build paopao-ce
@go build -pgo=auto -trimpath -tags '$(TAGS)' -ldflags '$(LDFLAGS)' -o $(RELEASE_ROOT)/$(TARGET)
Expand Down
2 changes: 1 addition & 1 deletion auto/api/m/v1/user.go

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion auto/api/r/v1/user.go

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion auto/api/s/v1/user.go

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

3 changes: 2 additions & 1 deletion auto/api/v1/admin.go

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion auto/api/v1/alipay_priv.go

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion auto/api/v1/alipay_pub.go

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion auto/api/v1/core.go

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion auto/api/v1/followship.go

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

10 changes: 5 additions & 5 deletions auto/api/v1/friendship.go

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion auto/api/v1/loose.go

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion auto/api/v1/priv.go

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion auto/api/v1/pub.go

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion auto/api/v1/relax.go

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion auto/api/v1/site.go

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion auto/api/v1/trends.go

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion auto/api/x/v1/user.go

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

26 changes: 26 additions & 0 deletions build-allinone.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,26 @@
#!/bin/sh
# eg.1 : sh build-image.sh
# eg.2, set image: sh build-image.sh bitbus/paopao-ce

VERSION=`git describe --tags --always | cut -f1,2 -d "-"` # eg.: 0.2.5
IMAGE="bitbus/paopao-ce"

if [ -n "$1" ]; then
IMAGE="$1"
fi
if [ -n "$2" ]; then
VERSION="$2"
fi

# build image
docker buildx build \
--build-arg USE_DIST="yes" \
--tag "$IMAGE:all-in-one-${VERSION}" \
--tag "$IMAGE:all-in-one-latest" \
. -f Dockerfile.allinone

# push to image rep
# if [ -n "$1" ]; then
# docker push "$IMAGE:${VERSION}"
# docker push "$IMAGE:latest"
# fi
2 changes: 1 addition & 1 deletion docker-compose.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -67,7 +67,7 @@ services:
# - paopao-network

meili:
image: getmeili/meilisearch:${MEILI_TAG:-v1.6}
image: getmeili/meilisearch:${MEILI_TAG:-v1.7}
restart: always
ports:
- 7700:7700
Expand Down
2 changes: 1 addition & 1 deletion docs/openapi/index.html
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
<meta charset="utf-8" />
<link rel="icon" href="/favicon.ico" />
<title>paopao-ce develop documents</title>
<!-- Important: rapi-doc uses utf8 charecters -->
<!-- Important: rapi-doc uses utf8 characters -->
<script
type="module"
src="/docs/openapi/assets/rapidoc-min.js"
Expand Down
2 changes: 1 addition & 1 deletion docs/openapi/openapi.json
Original file line number Diff line number Diff line change
Expand Up @@ -160,7 +160,7 @@
"type": "string"
},
"in": "header",
"description": "A set of `,` seperated content-types that could be sent as a response.\nE.g. `image/png,image/webp,image/gif`",
"description": "A set of `,` separated content-types that could be sent as a response.\nE.g. `image/png,image/webp,image/gif`",
"required": false,
"deprecated": false
}
Expand Down
Loading

0 comments on commit 4c66694

Please sign in to comment.