fix Makefile and Dockerfile to build on latest go versions
Signed-off-by: İlteriş Yağıztegin Eroğlu <ilteris.eroglu@trendyol.com>
This commit is contained in:
parent
3e6669828c
commit
77cc1cc816
|
@ -1,5 +1,5 @@
|
||||||
# Build image
|
# Build image
|
||||||
FROM golang:1.15-alpine as build
|
FROM golang:1.19-alpine as build
|
||||||
|
|
||||||
RUN apk add --update nodejs npm make g++ git
|
RUN apk add --update nodejs npm make g++ git
|
||||||
RUN npm install -g less less-plugin-clean-css
|
RUN npm install -g less less-plugin-clean-css
|
||||||
|
@ -9,7 +9,10 @@ WORKDIR /go/src/github.com/writefreely/writefreely
|
||||||
|
|
||||||
COPY . .
|
COPY . .
|
||||||
|
|
||||||
|
RUN cat ossl_legacy.cnf > /etc/ssl/openssl.cnf
|
||||||
|
|
||||||
ENV GO111MODULE=on
|
ENV GO111MODULE=on
|
||||||
|
ENV NODE_OPTIONS=--openssl-legacy-provider
|
||||||
|
|
||||||
RUN make build \
|
RUN make build \
|
||||||
&& make ui
|
&& make ui
|
||||||
|
|
24
Makefile
24
Makefile
|
@ -25,39 +25,39 @@ build-no-sqlite: deps-no-sqlite
|
||||||
|
|
||||||
build-linux: deps
|
build-linux: deps
|
||||||
@hash xgo > /dev/null 2>&1; if [ $$? -ne 0 ]; then \
|
@hash xgo > /dev/null 2>&1; if [ $$? -ne 0 ]; then \
|
||||||
$(GOGET) -u src.techknowlogick.com/xgo; \
|
$(GOCMD) install src.techknowlogick.com/xgo@latest; \
|
||||||
fi
|
fi
|
||||||
xgo --targets=linux/amd64, -dest build/ $(LDFLAGS) -tags='sqlite' -go go-1.15.x -out writefreely ./cmd/writefreely
|
xgo --targets=linux/amd64, -dest build/ $(LDFLAGS) -tags='sqlite' -go go-1.19.x -out writefreely -pkg ./cmd/writefreely .
|
||||||
|
|
||||||
build-windows: deps
|
build-windows: deps
|
||||||
@hash xgo > /dev/null 2>&1; if [ $$? -ne 0 ]; then \
|
@hash xgo > /dev/null 2>&1; if [ $$? -ne 0 ]; then \
|
||||||
$(GOGET) -u src.techknowlogick.com/xgo; \
|
$(GOCMD) install src.techknowlogick.com/xgo@latest; \
|
||||||
fi
|
fi
|
||||||
xgo --targets=windows/amd64, -dest build/ $(LDFLAGS) -tags='sqlite' -go go-1.15.x -out writefreely ./cmd/writefreely
|
xgo --targets=windows/amd64, -dest build/ $(LDFLAGS) -tags='sqlite' -go go-1.19.x -out writefreely -pkg ./cmd/writefreely .
|
||||||
|
|
||||||
build-darwin: deps
|
build-darwin: deps
|
||||||
@hash xgo > /dev/null 2>&1; if [ $$? -ne 0 ]; then \
|
@hash xgo > /dev/null 2>&1; if [ $$? -ne 0 ]; then \
|
||||||
$(GOGET) -u src.techknowlogick.com/xgo; \
|
$(GOCMD) install src.techknowlogick.com/xgo@latest; \
|
||||||
fi
|
fi
|
||||||
xgo --targets=darwin/amd64, -dest build/ $(LDFLAGS) -tags='sqlite' -go go-1.15.x -out writefreely ./cmd/writefreely
|
xgo --targets=darwin/amd64, -dest build/ $(LDFLAGS) -tags='sqlite' -go go-1.19.x -out writefreely -pkg ./cmd/writefreely .
|
||||||
|
|
||||||
build-arm6: deps
|
build-arm6: deps
|
||||||
@hash xgo > /dev/null 2>&1; if [ $$? -ne 0 ]; then \
|
@hash xgo > /dev/null 2>&1; if [ $$? -ne 0 ]; then \
|
||||||
$(GOGET) -u src.techknowlogick.com/xgo; \
|
$(GOCMD) install src.techknowlogick.com/xgo@latest; \
|
||||||
fi
|
fi
|
||||||
xgo --targets=linux/arm-6, -dest build/ $(LDFLAGS) -tags='sqlite' -go go-1.15.x -out writefreely ./cmd/writefreely
|
xgo --targets=linux/arm-6, -dest build/ $(LDFLAGS) -tags='sqlite' -go go-1.19.x -out writefreely -pkg ./cmd/writefreely .
|
||||||
|
|
||||||
build-arm7: deps
|
build-arm7: deps
|
||||||
@hash xgo > /dev/null 2>&1; if [ $$? -ne 0 ]; then \
|
@hash xgo > /dev/null 2>&1; if [ $$? -ne 0 ]; then \
|
||||||
$(GOGET) -u src.techknowlogick.com/xgo; \
|
$(GOCMD) install src.techknowlogick.com/xgo@latest; \
|
||||||
fi
|
fi
|
||||||
xgo --targets=linux/arm-7, -dest build/ $(LDFLAGS) -tags='sqlite' -go go-1.15.x -out writefreely ./cmd/writefreely
|
xgo --targets=linux/arm-7, -dest build/ $(LDFLAGS) -tags='sqlite' -go go-1.19.x -out writefreely -pkg ./cmd/writefreely .
|
||||||
|
|
||||||
build-arm64: deps
|
build-arm64: deps
|
||||||
@hash xgo > /dev/null 2>&1; if [ $$? -ne 0 ]; then \
|
@hash xgo > /dev/null 2>&1; if [ $$? -ne 0 ]; then \
|
||||||
$(GOGET) -u src.techknowlogick.com/xgo; \
|
$(GOCMD) install src.techknowlogick.com/xgo@latest; \
|
||||||
fi
|
fi
|
||||||
xgo --targets=linux/arm64, -dest build/ $(LDFLAGS) -tags='sqlite' -go go-1.15.x -out writefreely ./cmd/writefreely
|
xgo --targets=linux/arm64, -dest build/ $(LDFLAGS) -tags='sqlite' -go go-1.19.x -out writefreely -pkg ./cmd/writefreely .
|
||||||
|
|
||||||
build-docker :
|
build-docker :
|
||||||
$(DOCKERCMD) build -t $(IMAGE_NAME):latest -t $(IMAGE_NAME):$(GITREV) .
|
$(DOCKERCMD) build -t $(IMAGE_NAME):latest -t $(IMAGE_NAME):$(GITREV) .
|
||||||
|
|
|
@ -0,0 +1,10 @@
|
||||||
|
|
||||||
|
[provider_sect]
|
||||||
|
default = default_sect
|
||||||
|
legacy = legacy_sect
|
||||||
|
|
||||||
|
[default_sect]
|
||||||
|
activate = 1
|
||||||
|
|
||||||
|
[legacy_sect]
|
||||||
|
activate = 1
|
Loading…
Reference in New Issue