Skip to content

Commit

Permalink
feat: Release v1.22.2 (#261)
Browse files Browse the repository at this point in the history
  • Loading branch information
pedrofaria authored Dec 1, 2023
1 parent 88940fe commit fd88740
Show file tree
Hide file tree
Showing 10 changed files with 85 additions and 69 deletions.
4 changes: 4 additions & 0 deletions .dockerignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
releases/
secrets/
config/
public/dist/build.js*
5 changes: 5 additions & 0 deletions .github/workflows/build-and-push-docker.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,10 @@ jobs:
- name: Get the version
id: get_version
run: echo "VERSION=${GITHUB_REF/refs\/tags\//}" >> "$GITHUB_OUTPUT"

- name: Get the commit
id: get_commit
run: echo "COMMIT=${GITHUB_SHA}" >> "$GITHUB_OUTPUT"

- name: Docker meta
id: meta
Expand All @@ -40,5 +44,6 @@ jobs:
push: true
build-args: |
VERSION=${{ steps.get_version.outputs.VERSION }}
COMMIT=${{ steps.get_version.outputs.COMMIT }}
tags: ${{ steps.meta.outputs.tags }}
labels: ${{ steps.meta.outputs.labels }}
4 changes: 4 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,9 @@
# Changelog

## 1.22.2
* bump some go libs
* first test with wine killing processes issue

## 1.22.1
* Full support for non numeric instances id

Expand Down
5 changes: 3 additions & 2 deletions Dockerfile
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
FROM golang:1-bullseye AS builder
FROM golang:1-bookworm AS builder

ARG VERSION=docker

Expand All @@ -10,12 +10,13 @@ RUN curl -fsSL https://deb.nodesource.com/gpgkey/nodesource-repo.gpg.key | gpg -
RUN echo "deb [signed-by=/etc/apt/keyrings/nodesource.gpg] https://deb.nodesource.com/node_$NODE_MAJOR.x nodistro main" | tee /etc/apt/sources.list.d/nodesource.list

RUN apt-get update && export DEBIAN_FRONTEND=noninteractive \
&& apt-get install -y git build-essential nodejs zip
&& apt-get install -y git build-essential nodejs="${NODE_MAJOR}.*" zip

WORKDIR /accweb_src

COPY . /accweb_src

# RUN rm public/dist/*
RUN sh build/build_release.sh ${VERSION}
RUN cd /accweb_src/releases && unzip accweb_${VERSION}.zip && mv accweb_${VERSION} /accweb

Expand Down
6 changes: 6 additions & 0 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -10,3 +10,9 @@ run-dev-frontend:

swag:
${GOPATH}/bin/swag init -d cmd,internal -g ../internal/app/server.go

IMG ?= accweb/acceweb
VERSION ?= dev
TAG ?= latest
docker-build:
docker build . -t $(IMG):$(TAG) --progress plain --build-arg VERSION=$(VERSION) --build-arg COMMIT=`git rev-parse HEAD`
12 changes: 11 additions & 1 deletion build/build_release.sh
Original file line number Diff line number Diff line change
@@ -1,12 +1,22 @@
#!/bin/sh

VERSION=$1
COMMIT=$2

if [ -z $VERSION ]; then
echo "Usage: ./build/build_release.sh <Version Number, e.g. 1.2.3>"
exit
fi

if [ -z $COMMIT ]; then
COMMIT=`git rev-parse --short HEAD`
fi

COMMIT=$(echo "${COMMIT}" | cut -c1-7)

echo "Starting to build accweb $VERSION ( $COMMIT )"
node -v

# create release directory
RDIR="releases"
VDIR="accweb_$VERSION"
Expand All @@ -15,7 +25,7 @@ mkdir -p "$DIR"

# build frontend
cd public
COMMIT=`git rev-parse --short HEAD`
# COMMIT=`git rev-parse --short HEAD`
cp src/components/end.vue src/components/end.vue.orig
sed -i "s/%VERSION%/$VERSION/g" src/components/end.vue
sed -i "s/%COMMIT%/$COMMIT/g" src/components/end.vue
Expand Down
29 changes: 13 additions & 16 deletions go.mod
Original file line number Diff line number Diff line change
Expand Up @@ -4,51 +4,48 @@ go 1.21

require (
github.com/appleboy/gin-jwt/v2 v2.9.1
github.com/gin-contrib/cors v1.4.0
github.com/gin-contrib/cors v1.5.0
github.com/gin-gonic/gin v1.9.1
github.com/sirupsen/logrus v1.9.3
github.com/stretchr/testify v1.8.4
github.com/swaggo/swag v1.16.2
golang.org/x/text v0.13.0
golang.org/x/text v0.14.0
gopkg.in/yaml.v3 v3.0.1
)

require (
github.com/KyleBanks/depth v1.2.1 // indirect
github.com/bytedance/sonic v1.10.1 // indirect
github.com/bytedance/sonic v1.10.2 // indirect
github.com/chenzhuoyu/base64x v0.0.0-20230717121745-296ad89f973d // indirect
github.com/chenzhuoyu/iasm v0.9.0 // indirect
github.com/chenzhuoyu/iasm v0.9.1 // indirect
github.com/davecgh/go-spew v1.1.1 // indirect
github.com/gabriel-vasile/mimetype v1.4.2 // indirect
github.com/gabriel-vasile/mimetype v1.4.3 // indirect
github.com/gin-contrib/sse v0.1.0 // indirect
github.com/go-openapi/jsonpointer v0.20.0 // indirect
github.com/go-openapi/jsonreference v0.20.2 // indirect
github.com/go-openapi/spec v0.20.9 // indirect
github.com/go-openapi/swag v0.22.4 // indirect
github.com/go-playground/locales v0.14.1 // indirect
github.com/go-playground/universal-translator v0.18.1 // indirect
github.com/go-playground/validator/v10 v10.15.4 // indirect
github.com/go-playground/validator/v10 v10.16.0 // indirect
github.com/goccy/go-json v0.10.2 // indirect
github.com/golang-jwt/jwt/v4 v4.5.0 // indirect
github.com/josharian/intern v1.0.0 // indirect
github.com/json-iterator/go v1.1.12 // indirect
github.com/klauspost/cpuid/v2 v2.2.5 // indirect
github.com/knz/go-libedit v1.10.1 // indirect
github.com/klauspost/cpuid/v2 v2.2.6 // indirect
github.com/leodido/go-urn v1.2.4 // indirect
github.com/mailru/easyjson v0.7.7 // indirect
github.com/mattn/go-isatty v0.0.19 // indirect
github.com/mattn/go-isatty v0.0.20 // indirect
github.com/modern-go/concurrent v0.0.0-20180306012644-bacd9c7ef1dd // indirect
github.com/modern-go/reflect2 v1.0.2 // indirect
github.com/pelletier/go-toml/v2 v2.1.0 // indirect
github.com/pmezard/go-difflib v1.0.0 // indirect
github.com/stretchr/objx v0.5.0 // indirect
github.com/twitchyliquid64/golang-asm v0.15.1 // indirect
github.com/ugorji/go/codec v1.2.11 // indirect
golang.org/x/arch v0.5.0 // indirect
golang.org/x/crypto v0.13.0 // indirect
golang.org/x/net v0.15.0 // indirect
golang.org/x/sys v0.12.0 // indirect
golang.org/x/tools v0.13.0 // indirect
golang.org/x/xerrors v0.0.0-20220907171357-04be3eba64a2 // indirect
golang.org/x/arch v0.6.0 // indirect
golang.org/x/crypto v0.15.0 // indirect
golang.org/x/net v0.18.0 // indirect
golang.org/x/sys v0.14.0 // indirect
golang.org/x/tools v0.15.0 // indirect
google.golang.org/protobuf v1.31.0 // indirect
)
Loading

0 comments on commit fd88740

Please sign in to comment.