Merge pull request #10147 from id/chore-minor-improvements

Chore minor improvements
This commit is contained in:
Ivan Dyachkov 2023-03-16 08:18:43 +00:00 committed by GitHub
commit e3d4deb8a0
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
24 changed files with 69 additions and 85 deletions

View File

@ -4,7 +4,7 @@ on: [pull_request]
jobs: jobs:
check_apps_version: check_apps_version:
runs-on: ubuntu-20.04 runs-on: ubuntu-22.04
steps: steps:
- uses: actions/checkout@v3 - uses: actions/checkout@v3

View File

@ -25,7 +25,7 @@ jobs:
prepare: prepare:
runs-on: ubuntu-22.04 runs-on: ubuntu-22.04
# prepare source with any OTP version, no need for a matrix # prepare source with any OTP version, no need for a matrix
container: "ghcr.io/emqx/emqx-builder/5.0-29:1.13.4-24.3.4.2-2-ubuntu22.04" container: "ghcr.io/emqx/emqx-builder/5.0-32:1.13.4-24.3.4.2-2-ubuntu22.04"
outputs: outputs:
PROFILE: ${{ steps.get_profile.outputs.PROFILE }} PROFILE: ${{ steps.get_profile.outputs.PROFILE }}
@ -121,7 +121,7 @@ jobs:
# NOTE: 'otp' and 'elixir' are to configure emqx-builder image # NOTE: 'otp' and 'elixir' are to configure emqx-builder image
# only support latest otp and elixir, not a matrix # only support latest otp and elixir, not a matrix
builder: builder:
- 5.0-29 # update to latest - 5.0-32 # update to latest
otp: otp:
- 24.3.4.2-2 # switch to 25 once ready to release 5.1 - 24.3.4.2-2 # switch to 25 once ready to release 5.1
elixir: elixir:

View File

@ -24,7 +24,7 @@ jobs:
prepare: prepare:
runs-on: ubuntu-22.04 runs-on: ubuntu-22.04
if: (github.repository_owner == 'emqx' && github.event_name == 'schedule') || github.event_name != 'schedule' if: (github.repository_owner == 'emqx' && github.event_name == 'schedule') || github.event_name != 'schedule'
container: ghcr.io/emqx/emqx-builder/5.0-29:1.13.4-24.3.4.2-2-ubuntu22.04 container: ghcr.io/emqx/emqx-builder/5.0-32:1.13.4-24.3.4.2-2-ubuntu22.04
outputs: outputs:
BUILD_PROFILE: ${{ steps.get_profile.outputs.BUILD_PROFILE }} BUILD_PROFILE: ${{ steps.get_profile.outputs.BUILD_PROFILE }}
IS_EXACT_TAG: ${{ steps.get_profile.outputs.IS_EXACT_TAG }} IS_EXACT_TAG: ${{ steps.get_profile.outputs.IS_EXACT_TAG }}
@ -221,7 +221,7 @@ jobs:
- aws-arm64 - aws-arm64
- ubuntu-22.04 - ubuntu-22.04
builder: builder:
- 5.0-29 - 5.0-32
elixir: elixir:
- 1.13.4 - 1.13.4
exclude: exclude:
@ -235,7 +235,7 @@ jobs:
arch: amd64 arch: amd64
os: ubuntu22.04 os: ubuntu22.04
build_machine: ubuntu-22.04 build_machine: ubuntu-22.04
builder: 5.0-29 builder: 5.0-32
elixir: 1.13.4 elixir: 1.13.4
release_with: elixir release_with: elixir
- profile: emqx - profile: emqx
@ -243,7 +243,7 @@ jobs:
arch: amd64 arch: amd64
os: amzn2 os: amzn2
build_machine: ubuntu-22.04 build_machine: ubuntu-22.04
builder: 5.0-29 builder: 5.0-32
elixir: 1.13.4 elixir: 1.13.4
release_with: elixir release_with: elixir
@ -339,7 +339,7 @@ jobs:
echo "$(cat $var.sha256) $var" | sha256sum -c || exit 1 echo "$(cat $var.sha256) $var" | sha256sum -c || exit 1
done done
cd - cd -
- uses: aws-actions/configure-aws-credentials@v1-node16 - uses: aws-actions/configure-aws-credentials@v2
with: with:
aws-access-key-id: ${{ secrets.AWS_ACCESS_KEY_ID }} aws-access-key-id: ${{ secrets.AWS_ACCESS_KEY_ID }}
aws-secret-access-key: ${{ secrets.AWS_SECRET_ACCESS_KEY }} aws-secret-access-key: ${{ secrets.AWS_SECRET_ACCESS_KEY }}

View File

@ -35,7 +35,7 @@ jobs:
- ["emqx-enterprise", "24.3.4.2-2", "amzn2", "erlang"] - ["emqx-enterprise", "24.3.4.2-2", "amzn2", "erlang"]
- ["emqx-enterprise", "25.1.2-2", "ubuntu20.04", "erlang"] - ["emqx-enterprise", "25.1.2-2", "ubuntu20.04", "erlang"]
builder: builder:
- 5.0-29 - 5.0-32
elixir: elixir:
- '1.13.4' - '1.13.4'

View File

@ -5,8 +5,8 @@ on:
jobs: jobs:
check_deps_integrity: check_deps_integrity:
runs-on: ubuntu-latest runs-on: ubuntu-22.04
container: ghcr.io/emqx/emqx-builder/5.0-29:1.13.4-25.1.2-2-ubuntu22.04 container: ghcr.io/emqx/emqx-builder/5.0-32:1.13.4-25.1.2-2-ubuntu22.04
steps: steps:
- uses: actions/checkout@v3 - uses: actions/checkout@v3

View File

@ -5,7 +5,7 @@ on: [pull_request]
jobs: jobs:
code_style_check: code_style_check:
runs-on: ubuntu-22.04 runs-on: ubuntu-22.04
container: "ghcr.io/emqx/emqx-builder/5.0-29:1.13.4-25.1.2-2-ubuntu22.04" container: "ghcr.io/emqx/emqx-builder/5.0-32:1.13.4-25.1.2-2-ubuntu22.04"
steps: steps:
- uses: actions/checkout@v3 - uses: actions/checkout@v3
with: with:

View File

@ -7,9 +7,9 @@ on:
jobs: jobs:
elixir_apps_check: elixir_apps_check:
runs-on: ubuntu-latest runs-on: ubuntu-22.04
# just use the latest builder # just use the latest builder
container: "ghcr.io/emqx/emqx-builder/5.0-29:1.13.4-25.1.2-2-ubuntu22.04" container: "ghcr.io/emqx/emqx-builder/5.0-32:1.13.4-25.1.2-2-ubuntu22.04"
strategy: strategy:
fail-fast: false fail-fast: false

View File

@ -7,8 +7,8 @@ on:
jobs: jobs:
elixir_deps_check: elixir_deps_check:
runs-on: ubuntu-latest runs-on: ubuntu-22.04
container: ghcr.io/emqx/emqx-builder/5.0-29:1.13.4-25.1.2-2-ubuntu22.04 container: ghcr.io/emqx/emqx-builder/5.0-32:1.13.4-25.1.2-2-ubuntu22.04
steps: steps:
- name: Checkout - name: Checkout

View File

@ -11,13 +11,13 @@ on:
jobs: jobs:
elixir_release_build: elixir_release_build:
runs-on: ubuntu-latest runs-on: ubuntu-22.04
strategy: strategy:
matrix: matrix:
profile: profile:
- emqx - emqx
- emqx-enterprise - emqx-enterprise
container: ghcr.io/emqx/emqx-builder/5.0-29:1.13.4-25.1.2-2-ubuntu22.04 container: ghcr.io/emqx/emqx-builder/5.0-32:1.13.4-25.1.2-2-ubuntu22.04
steps: steps:
- name: Checkout - name: Checkout
uses: actions/checkout@v3 uses: actions/checkout@v3

View File

@ -19,7 +19,7 @@ jobs:
strategy: strategy:
fail-fast: false fail-fast: false
steps: steps:
- uses: aws-actions/configure-aws-credentials@v1-node16 - uses: aws-actions/configure-aws-credentials@v2
with: with:
aws-access-key-id: ${{ secrets.AWS_ACCESS_KEY_ID }} aws-access-key-id: ${{ secrets.AWS_ACCESS_KEY_ID }}
aws-secret-access-key: ${{ secrets.AWS_SECRET_ACCESS_KEY }} aws-secret-access-key: ${{ secrets.AWS_SECRET_ACCESS_KEY }}

View File

@ -12,7 +12,7 @@ jobs:
strategy: strategy:
matrix: matrix:
builder: builder:
- 5.0-29 - 5.0-32
otp: otp:
- 24.3.4.2-2 - 24.3.4.2-2
- 25.1.2-2 - 25.1.2-2

View File

@ -15,9 +15,9 @@ on:
jobs: jobs:
prepare: prepare:
runs-on: ubuntu-latest runs-on: ubuntu-22.04
# prepare source with any OTP version, no need for a matrix # prepare source with any OTP version, no need for a matrix
container: ghcr.io/emqx/emqx-builder/5.0-29:1.13.4-24.3.4.2-2-debian11 container: ghcr.io/emqx/emqx-builder/5.0-32:1.13.4-24.3.4.2-2-debian11
steps: steps:
- uses: actions/checkout@v3 - uses: actions/checkout@v3
@ -50,7 +50,7 @@ jobs:
os: os:
- ["debian11", "debian:11-slim"] - ["debian11", "debian:11-slim"]
builder: builder:
- 5.0-29 - 5.0-32
otp: otp:
- 24.3.4.2-2 - 24.3.4.2-2
elixir: elixir:
@ -123,7 +123,7 @@ jobs:
os: os:
- ["debian11", "debian:11-slim"] - ["debian11", "debian:11-slim"]
builder: builder:
- 5.0-29 - 5.0-32
otp: otp:
- 24.3.4.2-2 - 24.3.4.2-2
elixir: elixir:

View File

@ -4,41 +4,13 @@ on: [pull_request]
jobs: jobs:
run_gitlint: run_gitlint:
runs-on: ubuntu-20.04 runs-on: ubuntu-22.04
steps: steps:
- name: Checkout source code - uses: actions/checkout@v3
uses: actions/checkout@v3 with:
- name: Install gitlint fetch-depth: 0
run: |
sudo apt-get update
sudo apt install gitlint
- name: Set auth header
if: endsWith(github.repository, 'enterprise')
run: |
echo 'AUTH_HEADER<<EOF' >> $GITHUB_ENV
echo "Authorization: token ${{ secrets.CI_GIT_TOKEN }}" >> $GITHUB_ENV
echo 'EOF' >> $GITHUB_ENV
- name: Run gitlint - name: Run gitlint
shell: bash shell: bash
run: | run: |
pr_number=$(echo $GITHUB_REF | awk 'BEGIN { FS = "/" } ; { print $3 }') set -ex
messages="$(curl --silent --show-error \ docker run --ulimit nofile=1024 -v $(pwd):/repo -w /repo ghcr.io/emqx/gitlint --commits ${{ github.event.pull_request.base.sha }}..$GITHUB_SHA --config .github/workflows/.gitlint
--header "${{ env.AUTH_HEADER }}" \
--header "Accept: application/vnd.github.v3+json" \
"https://api.github.com/repos/${GITHUB_REPOSITORY}/pulls/${pr_number}/commits")"
len=$(echo $messages | jq length)
result=true
for i in $( seq 0 $(($len - 1)) ); do
message=$(echo $messages | jq -r .[$i].commit.message)
echo "commit message: $message"
status=0
echo $message | gitlint -C ./.github/workflows/.gitlint || status=$?
if [ $status -ne 0 ]; then
result=false
fi
done
if ! ${result} ; then
echo "Some of the commit messages are not structured as The Conventional Commits specification. Please check CONTRIBUTING.md for our process on PR."
exit 1
fi
echo "success"

View File

@ -10,7 +10,7 @@ on:
jobs: jobs:
build_emqx_for_jmeter_tests: build_emqx_for_jmeter_tests:
runs-on: ubuntu-latest runs-on: ubuntu-22.04
outputs: outputs:
version: ${{ steps.build_docker.outputs.version}} version: ${{ steps.build_docker.outputs.version}}
steps: steps:
@ -44,7 +44,7 @@ jobs:
path: ./emqx.tar path: ./emqx.tar
advanced_feat: advanced_feat:
runs-on: ubuntu-latest runs-on: ubuntu-22.04
strategy: strategy:
fail-fast: false fail-fast: false
@ -136,7 +136,7 @@ jobs:
path: ./jmeter_logs path: ./jmeter_logs
pgsql_authn_authz: pgsql_authn_authz:
runs-on: ubuntu-latest runs-on: ubuntu-22.04
strategy: strategy:
fail-fast: false fail-fast: false
@ -245,7 +245,7 @@ jobs:
path: ./jmeter_logs path: ./jmeter_logs
mysql_authn_authz: mysql_authn_authz:
runs-on: ubuntu-latest runs-on: ubuntu-22.04
strategy: strategy:
fail-fast: false fail-fast: false
@ -351,7 +351,7 @@ jobs:
path: ./jmeter_logs path: ./jmeter_logs
JWT_authn: JWT_authn:
runs-on: ubuntu-latest runs-on: ubuntu-22.04
strategy: strategy:
fail-fast: false fail-fast: false
@ -449,7 +449,7 @@ jobs:
path: ./jmeter_logs path: ./jmeter_logs
built_in_database_authn_authz: built_in_database_authn_authz:
runs-on: ubuntu-latest runs-on: ubuntu-22.04
strategy: strategy:
fail-fast: false fail-fast: false
@ -541,7 +541,7 @@ jobs:
path: ./jmeter_logs path: ./jmeter_logs
delete-artifact: delete-artifact:
runs-on: ubuntu-latest runs-on: ubuntu-22.04
needs: [advanced_feat,pgsql_authn_authz,JWT_authn,mysql_authn_authz,built_in_database_authn_authz] needs: [advanced_feat,pgsql_authn_authz,JWT_authn,mysql_authn_authz,built_in_database_authn_authz]
steps: steps:
- uses: geekyeggo/delete-artifact@v2 - uses: geekyeggo/delete-artifact@v2

View File

@ -15,7 +15,7 @@ concurrency:
jobs: jobs:
relup_test_plan: relup_test_plan:
runs-on: ubuntu-22.04 runs-on: ubuntu-22.04
container: "ghcr.io/emqx/emqx-builder/5.0-29:1.13.4-24.3.4.2-2-ubuntu22.04" container: "ghcr.io/emqx/emqx-builder/5.0-32:1.13.4-24.3.4.2-2-ubuntu22.04"
outputs: outputs:
CUR_EE_VSN: ${{ steps.find-versions.outputs.CUR_EE_VSN }} CUR_EE_VSN: ${{ steps.find-versions.outputs.CUR_EE_VSN }}
OLD_VERSIONS: ${{ steps.find-versions.outputs.OLD_VERSIONS }} OLD_VERSIONS: ${{ steps.find-versions.outputs.OLD_VERSIONS }}
@ -58,7 +58,7 @@ jobs:
needs: needs:
- relup_test_plan - relup_test_plan
if: needs.relup_test_plan.outputs.OLD_VERSIONS != '[]' if: needs.relup_test_plan.outputs.OLD_VERSIONS != '[]'
runs-on: ubuntu-20.04 runs-on: ubuntu-22.04
strategy: strategy:
fail-fast: false fail-fast: false
matrix: matrix:

View File

@ -16,7 +16,7 @@ on:
jobs: jobs:
build-matrix: build-matrix:
runs-on: ubuntu-latest runs-on: ubuntu-22.04
outputs: outputs:
prepare: ${{ steps.matrix.outputs.prepare }} prepare: ${{ steps.matrix.outputs.prepare }}
host: ${{ steps.matrix.outputs.host }} host: ${{ steps.matrix.outputs.host }}
@ -31,12 +31,12 @@ jobs:
MATRIX="$(echo "${APPS}" | jq -c ' MATRIX="$(echo "${APPS}" | jq -c '
[ [
(.[] | select(.profile == "emqx") | . + { (.[] | select(.profile == "emqx") | . + {
builder: "5.0-29", builder: "5.0-32",
otp: "25.1.2-2", otp: "25.1.2-2",
elixir: "1.13.4" elixir: "1.13.4"
}), }),
(.[] | select(.profile == "emqx-enterprise") | . + { (.[] | select(.profile == "emqx-enterprise") | . + {
builder: "5.0-29", builder: "5.0-32",
otp: ["24.3.4.2-2", "25.1.2-2"][], otp: ["24.3.4.2-2", "25.1.2-2"][],
elixir: "1.13.4" elixir: "1.13.4"
}) })
@ -63,12 +63,17 @@ jobs:
fail-fast: false fail-fast: false
matrix: matrix:
include: ${{ fromJson(needs.build-matrix.outputs.prepare) }} include: ${{ fromJson(needs.build-matrix.outputs.prepare) }}
container: "ghcr.io/emqx/emqx-builder/${{ matrix.builder }}:${{ matrix.elixir }}-${{ matrix.otp }}-ubuntu20.04" container: "ghcr.io/emqx/emqx-builder/${{ matrix.builder }}:${{ matrix.elixir }}-${{ matrix.otp }}-ubuntu22.04"
steps: steps:
- uses: AutoModality/action-clean@v1 - uses: AutoModality/action-clean@v1
- uses: actions/checkout@v3 - uses: actions/checkout@v3
with: with:
path: source path: source
- uses: actions/cache@v3
id: cache
with:
path: "$HOME/.cache/rebar3/rebar3_${{ matrix.otp }}_plt"
key: rebar3-dialyzer-plt-${{ matrix.otp }}
- name: get_all_deps - name: get_all_deps
working-directory: source working-directory: source
env: env:
@ -100,7 +105,7 @@ jobs:
defaults: defaults:
run: run:
shell: bash shell: bash
container: "ghcr.io/emqx/emqx-builder/${{ matrix.builder }}:${{ matrix.elixir }}-${{ matrix.otp }}-ubuntu20.04" container: "ghcr.io/emqx/emqx-builder/${{ matrix.builder }}:${{ matrix.elixir }}-${{ matrix.otp }}-ubuntu22.04"
steps: steps:
- uses: AutoModality/action-clean@v1 - uses: AutoModality/action-clean@v1
@ -156,7 +161,7 @@ jobs:
- name: run tests - name: run tests
working-directory: source working-directory: source
env: env:
DOCKER_CT_RUNNER_IMAGE: "ghcr.io/emqx/emqx-builder/${{ matrix.builder }}:${{ matrix.elixir }}-${{ matrix.otp }}-ubuntu20.04" DOCKER_CT_RUNNER_IMAGE: "ghcr.io/emqx/emqx-builder/${{ matrix.builder }}:${{ matrix.elixir }}-${{ matrix.otp }}-ubuntu22.04"
MONGO_TAG: "5" MONGO_TAG: "5"
MYSQL_TAG: "8" MYSQL_TAG: "8"
PGSQL_TAG: "13" PGSQL_TAG: "13"
@ -186,7 +191,7 @@ jobs:
matrix: matrix:
include: ${{ fromJson(needs.build-matrix.outputs.host) }} include: ${{ fromJson(needs.build-matrix.outputs.host) }}
container: "ghcr.io/emqx/emqx-builder/${{ matrix.builder }}:${{ matrix.elixir }}-${{ matrix.otp }}-ubuntu20.04" container: "ghcr.io/emqx/emqx-builder/${{ matrix.builder }}:${{ matrix.elixir }}-${{ matrix.otp }}-ubuntu22.04"
defaults: defaults:
run: run:
shell: bash shell: bash
@ -225,7 +230,7 @@ jobs:
- ct - ct
- ct_docker - ct_docker
runs-on: ubuntu-22.04 runs-on: ubuntu-22.04
container: "ghcr.io/emqx/emqx-builder/5.0-29:1.13.4-24.3.4.2-2-ubuntu22.04" container: "ghcr.io/emqx/emqx-builder/5.0-32:1.13.4-24.3.4.2-2-ubuntu22.04"
steps: steps:
- uses: AutoModality/action-clean@v1 - uses: AutoModality/action-clean@v1
- uses: actions/download-artifact@v3 - uses: actions/download-artifact@v3
@ -262,7 +267,7 @@ jobs:
# do this in a separate job # do this in a separate job
upload_coverdata: upload_coverdata:
needs: make_cover needs: make_cover
runs-on: ubuntu-20.04 runs-on: ubuntu-22.04
steps: steps:
- name: Coveralls Finished - name: Coveralls Finished
env: env:

View File

@ -5,7 +5,7 @@ on:
jobs: jobs:
shellcheck: shellcheck:
runs-on: ubuntu-latest runs-on: ubuntu-22.04
steps: steps:
- name: Checkout source code - name: Checkout source code
uses: actions/checkout@v3 uses: actions/checkout@v3

View File

@ -10,7 +10,7 @@ on:
jobs: jobs:
stale: stale:
runs-on: ubuntu-latest runs-on: ubuntu-22.04
if: github.repository_owner == 'emqx' if: github.repository_owner == 'emqx'
permissions: permissions:
issues: write issues: write

View File

@ -11,11 +11,11 @@ on:
jobs: jobs:
upload: upload:
runs-on: ubuntu-20.04 runs-on: ubuntu-22.04
strategy: strategy:
fail-fast: false fail-fast: false
steps: steps:
- uses: aws-actions/configure-aws-credentials@v1-node16 - uses: aws-actions/configure-aws-credentials@v2
with: with:
aws-access-key-id: ${{ secrets.AWS_ACCESS_KEY_ID }} aws-access-key-id: ${{ secrets.AWS_ACCESS_KEY_ID }}
aws-secret-access-key: ${{ secrets.AWS_SECRET_ACCESS_KEY }} aws-secret-access-key: ${{ secrets.AWS_SECRET_ACCESS_KEY }}

View File

@ -80,7 +80,7 @@ ct: $(REBAR) merge-config
## only check bpapi for enterprise profile because it's a super-set. ## only check bpapi for enterprise profile because it's a super-set.
.PHONY: static_checks .PHONY: static_checks
static_checks: static_checks:
@$(REBAR) as check do dialyzer, xref @$(REBAR) as check do xref, dialyzer
@if [ "$${PROFILE}" = 'emqx-enterprise' ]; then $(REBAR) ct --suite apps/emqx/test/emqx_static_checks --readable $(CT_READABLE); fi @if [ "$${PROFILE}" = 'emqx-enterprise' ]; then $(REBAR) ct --suite apps/emqx/test/emqx_static_checks --readable $(CT_READABLE); fi
@if [ "$${PROFILE}" = 'emqx-enterprise' ]; then ./scripts/check-i18n-style.sh; fi @if [ "$${PROFILE}" = 'emqx-enterprise' ]; then ./scripts/check-i18n-style.sh; fi

View File

@ -27,7 +27,7 @@
{jiffy, {git, "https://github.com/emqx/jiffy", {tag, "1.0.5"}}}, {jiffy, {git, "https://github.com/emqx/jiffy", {tag, "1.0.5"}}},
{cowboy, {git, "https://github.com/emqx/cowboy", {tag, "2.9.0"}}}, {cowboy, {git, "https://github.com/emqx/cowboy", {tag, "2.9.0"}}},
{esockd, {git, "https://github.com/emqx/esockd", {tag, "5.9.4"}}}, {esockd, {git, "https://github.com/emqx/esockd", {tag, "5.9.4"}}},
{ekka, {git, "https://github.com/emqx/ekka", {tag, "0.14.4"}}}, {ekka, {git, "https://github.com/emqx/ekka", {tag, "0.14.5"}}},
{gen_rpc, {git, "https://github.com/emqx/gen_rpc", {tag, "2.8.1"}}}, {gen_rpc, {git, "https://github.com/emqx/gen_rpc", {tag, "2.8.1"}}},
{hocon, {git, "https://github.com/emqx/hocon.git", {tag, "0.37.0"}}}, {hocon, {git, "https://github.com/emqx/hocon.git", {tag, "0.37.0"}}},
{pbkdf2, {git, "https://github.com/emqx/erlang-pbkdf2.git", {tag, "2.0.4"}}}, {pbkdf2, {git, "https://github.com/emqx/erlang-pbkdf2.git", {tag, "2.0.4"}}},

View File

@ -54,7 +54,7 @@ defmodule EMQXUmbrella.MixProject do
{:cowboy, github: "emqx/cowboy", tag: "2.9.0", override: true}, {:cowboy, github: "emqx/cowboy", tag: "2.9.0", override: true},
{:esockd, github: "emqx/esockd", tag: "5.9.4", override: true}, {:esockd, github: "emqx/esockd", tag: "5.9.4", override: true},
{:rocksdb, github: "emqx/erlang-rocksdb", tag: "1.7.2-emqx-9", override: true}, {:rocksdb, github: "emqx/erlang-rocksdb", tag: "1.7.2-emqx-9", override: true},
{:ekka, github: "emqx/ekka", tag: "0.14.4", override: true}, {:ekka, github: "emqx/ekka", tag: "0.14.5", override: true},
{:gen_rpc, github: "emqx/gen_rpc", tag: "2.8.1", override: true}, {:gen_rpc, github: "emqx/gen_rpc", tag: "2.8.1", override: true},
{:grpc, github: "emqx/grpc-erl", tag: "0.6.7", override: true}, {:grpc, github: "emqx/grpc-erl", tag: "0.6.7", override: true},
{:minirest, github: "emqx/minirest", tag: "1.3.8", override: true}, {:minirest, github: "emqx/minirest", tag: "1.3.8", override: true},

View File

@ -56,7 +56,7 @@
, {cowboy, {git, "https://github.com/emqx/cowboy", {tag, "2.9.0"}}} , {cowboy, {git, "https://github.com/emqx/cowboy", {tag, "2.9.0"}}}
, {esockd, {git, "https://github.com/emqx/esockd", {tag, "5.9.4"}}} , {esockd, {git, "https://github.com/emqx/esockd", {tag, "5.9.4"}}}
, {rocksdb, {git, "https://github.com/emqx/erlang-rocksdb", {tag, "1.7.2-emqx-9"}}} , {rocksdb, {git, "https://github.com/emqx/erlang-rocksdb", {tag, "1.7.2-emqx-9"}}}
, {ekka, {git, "https://github.com/emqx/ekka", {tag, "0.14.4"}}} , {ekka, {git, "https://github.com/emqx/ekka", {tag, "0.14.5"}}}
, {gen_rpc, {git, "https://github.com/emqx/gen_rpc", {tag, "2.8.1"}}} , {gen_rpc, {git, "https://github.com/emqx/gen_rpc", {tag, "2.8.1"}}}
, {grpc, {git, "https://github.com/emqx/grpc-erl", {tag, "0.6.7"}}} , {grpc, {git, "https://github.com/emqx/grpc-erl", {tag, "0.6.7"}}}
, {minirest, {git, "https://github.com/emqx/minirest", {tag, "1.3.8"}}} , {minirest, {git, "https://github.com/emqx/minirest", {tag, "1.3.8"}}}

View File

@ -233,10 +233,17 @@ if [ -d "${CHECKS_DIR}" ]; then
fi fi
generate_changelog () { generate_changelog () {
local from_tag="${PREV_TAG:-}" local from_tag num_en num_zh
from_tag="${PREV_TAG:-}"
if [[ -z $from_tag ]]; then if [[ -z $from_tag ]]; then
from_tag="$(./scripts/find-prev-rel-tag.sh "$PROFILE")" from_tag="$(./scripts/find-prev-rel-tag.sh "$PROFILE")"
fi fi
num_en=$(git diff --name-only -a "${from_tag}...HEAD" "changes" | grep -c '.en.md')
num_zh=$(git diff --name-only -a "${from_tag}...HEAD" "changes" | grep -c '.zh.md')
if [ "$num_en" -ne "$num_zh" ]; then
echo "Number of English and Chinese changelog files added since ${from_tag} do not match."
exit 1
fi
./scripts/rel/format-changelog.sh -b "${from_tag}" -l 'en' -v "$TAG" > "changes/${TAG}.en.md" ./scripts/rel/format-changelog.sh -b "${from_tag}" -l 'en' -v "$TAG" > "changes/${TAG}.en.md"
./scripts/rel/format-changelog.sh -b "${from_tag}" -l 'zh' -v "$TAG" > "changes/${TAG}.zh.md" ./scripts/rel/format-changelog.sh -b "${from_tag}" -l 'zh' -v "$TAG" > "changes/${TAG}.zh.md"
if [ -n "$(git diff --stat)" ]; then if [ -n "$(git diff --stat)" ]; then