Skip to content

Commit eaafa97

Browse files
Work around buildvcs issue by removing .git
1 parent 45852a8 commit eaafa97

File tree

3 files changed

+8
-2
lines changed

3 files changed

+8
-2
lines changed

Dockerfile

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -16,6 +16,9 @@ RUN apk --no-cache add build-base git nodejs npm
1616
COPY . ${GOPATH}/src/code.gitea.io/gitea
1717
WORKDIR ${GOPATH}/src/code.gitea.io/gitea
1818

19+
#Remove .git because of -buildvcs and submodule issue
20+
RUN rm -f .git
21+
1922
#Checkout version if set
2023
RUN if [ -n "${GITEA_VERSION}" ]; then git checkout "${GITEA_VERSION}"; fi \
2124
&& make clean-all build

Dockerfile.gitea.dev

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
FROM golang:1.17-alpine3.15
1+
FROM golang:1.19-alpine3.16
22

33
ARG GOPROXY
44
ENV GOPROXY ${GOPROXY:-direct}
@@ -30,6 +30,9 @@ RUN apk --no-cache add \
3030
COPY . /go/src/code.gitea.io/gitea
3131
WORKDIR /go/src/code.gitea.io/gitea
3232

33+
#Remove .git because of -buildvcs and submodule issue
34+
RUN rm -f .git
35+
3336
RUN npm install --no-save
3437
RUN make build
3538

routers/web/repo/editor.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -808,7 +808,7 @@ func UploadFilePostJson(ctx *context.Context) {
808808
Message: message,
809809
Files: form.Files,
810810
}); err != nil {
811-
if models.IsErrLFSFileLocked(err) {
811+
if git_model.IsErrLFSFileLocked(err) {
812812
response["message"] = ctx.Tr("repo.editor.upload_file_is_locked")
813813
ctx.JSON(http.StatusUnauthorized, response)
814814
} else if models.IsErrFilenameInvalid(err) {

0 commit comments

Comments
 (0)