From 5e42a67c8dac561952d45f59af8b0ca0a70265dc Mon Sep 17 00:00:00 2001 From: JianBo He Date: Thu, 24 Mar 2022 14:22:19 +0800 Subject: [PATCH 1/4] chore: update dashboard vsn --- scripts/get-dashboard.sh | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/scripts/get-dashboard.sh b/scripts/get-dashboard.sh index 39dd4c7d5..bcce2b651 100755 --- a/scripts/get-dashboard.sh +++ b/scripts/get-dashboard.sh @@ -8,8 +8,8 @@ cd -P -- "$(dirname -- "${BASH_SOURCE[0]}")/.." PKG_VSN="${PKG_VSN:-$(./pkg-vsn.sh)}" case "${PKG_VSN}" in 4.3*) - EMQX_CE_DASHBOARD_VERSION='v4.3.5' - EMQX_EE_DASHBOARD_VERSION='v4.3.15' + EMQX_CE_DASHBOARD_VERSION='v4.3.6' + EMQX_EE_DASHBOARD_VERSION='v4.3.16' ;; *) echo "Unsupported version $PKG_VSN" >&2 From 61d3ed31e8506f9a592bfd715e1e87f3a02c5aea Mon Sep 17 00:00:00 2001 From: JianBo He Date: Thu, 24 Mar 2022 14:23:19 +0800 Subject: [PATCH 2/4] chore: bump vsn to 4.3.13-rc.2 --- include/emqx_release.hrl | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/include/emqx_release.hrl b/include/emqx_release.hrl index bc9c49e57..682072ae9 100644 --- a/include/emqx_release.hrl +++ b/include/emqx_release.hrl @@ -29,7 +29,7 @@ -ifndef(EMQX_ENTERPRISE). --define(EMQX_RELEASE, {opensource, "4.3.13-rc.1"}). +-define(EMQX_RELEASE, {opensource, "4.3.13-rc.2"}). -else. From 3944888a19b9e4e5c3d1f7258e64f37d43cc4370 Mon Sep 17 00:00:00 2001 From: "Zaiming (Stone) Shi" Date: Thu, 24 Mar 2022 11:08:10 +0100 Subject: [PATCH 3/4] chore: update-appup.sh always rebuild baseline Reasons * OTP version might be different in developer's env and build env * For some tags, we do not build release. e.g. rel-v4.4.X --- .github/workflows/apps_version_check.yaml | 8 ++-- scripts/apps-version-check.sh | 2 +- scripts/update-appup.sh | 50 +++++++++-------------- 3 files changed, 25 insertions(+), 35 deletions(-) diff --git a/.github/workflows/apps_version_check.yaml b/.github/workflows/apps_version_check.yaml index 67355155f..7dfb4009f 100644 --- a/.github/workflows/apps_version_check.yaml +++ b/.github/workflows/apps_version_check.yaml @@ -16,12 +16,14 @@ jobs: container: emqx/build-env:${{ matrix.erl_otp }}-${{ matrix.os }} steps: - - uses: actions/checkout@v1 - - name: Check apps version - run: ./scripts/apps-version-check.sh + - uses: actions/checkout@v2 + with: + fetch-depth: 0 # need full history - name: Check relup (ce) if: endsWith(github.repository, 'emqx') run: ./scripts/update-appup.sh emqx --check - name: Check relup (ee) if: endsWith(github.repository, 'enterprise') run: ./scripts/update-appup.sh emqx-ee --check + - name: Check apps version + run: ./scripts/apps-version-check.sh diff --git a/scripts/apps-version-check.sh b/scripts/apps-version-check.sh index 525c73d83..83c4dcc92 100755 --- a/scripts/apps-version-check.sh +++ b/scripts/apps-version-check.sh @@ -1,7 +1,7 @@ #!/usr/bin/env bash set -euo pipefail -latest_release=$(git describe --abbrev=0 --tags) +latest_release=$(git describe --abbrev=0 --tags --exclude '*rc*' --exclude '*alpha*' --exclude '*beta*') bad_app_count=0 diff --git a/scripts/update-appup.sh b/scripts/update-appup.sh index a57cfbef8..aa5c65282 100755 --- a/scripts/update-appup.sh +++ b/scripts/update-appup.sh @@ -34,8 +34,12 @@ case "$PROFILE" in ;; esac -PREV_TAG="$(git describe --tag --match "${TAG_PREFIX}*" | grep -oE "${TAG_PREFIX}4\.[0-9]+\.[0-9]+")" -PREV_VERSION="${PREV_TAG#[e|v]}" +## possible tags: +## v4.3.11 +## e4.3.11 +## rel-v4.4.3 +## rel-e4.4.3 +PREV_TAG="$(git describe --tag --abbrev=0 --match "[${TAG_PREFIX}|rel-]*" --exclude '*rc*' --exclude '*alpha*' --exclude '*beta*')" shift 1 # bash 3.2 treat empty array as unbound, so we can't use 'ESCRIPT_ARGS=()' here, @@ -74,46 +78,30 @@ if [ "${SKIP_BUILD:-}" != 'yes' ]; then make "${PROFILE}" fi -SYSTEM="${SYSTEM:-$(./scripts/get-distro.sh)}" -if [ -z "${ARCH:-}" ]; then - UNAME="$(uname -m)" - case "$UNAME" in - x86_64) - ARCH='amd64' - ;; - aarch64) - ARCH='arm64' - ;; - arm*) - ARCH='arm' - ;; - esac -fi - -PACKAGE_NAME="${PROFILE}-${SYSTEM}-${PREV_VERSION}-${ARCH}.zip" -DOWNLOAD_URL="https://www.emqx.com/downloads/${DIR}/v${PREV_VERSION}/${PACKAGE_NAME}" - -PREV_DIR_BASE="/tmp/emqx-appup-base" +PREV_DIR_BASE="/tmp/emqx-appup-build" mkdir -p "${PREV_DIR_BASE}" -pushd "${PREV_DIR_BASE}" -if [ ! -f "${PACKAGE_NAME}" ]; then - echo "Download: ${PACKAGE_NAME}" - curl -f -L -o "${PACKAGE_NAME}" "${DOWNLOAD_URL}" -fi -if [ ! -d "${PREV_TAG}" ]; then - unzip -q -n -d "${PREV_TAG}" "${PACKAGE_NAME}" +if [ ! -d "${PREV_TAG}" ]; then + cp -R . "${PREV_DIR_BASE}/${PREV_TAG}" fi + +pushd "${PREV_DIR_BASE}/${PREV_TAG}" +git reset --hard +git checkout ${PREV_TAG} +make clean-all +make $PROFILE popd +PREV_REL_DIR="${PREV_DIR_BASE}/${PREV_TAG}/_build/${PROFILE}/lib" + # bash 3.2 does not allow empty array, so we had to add an empty string in the ESCRIPT_ARGS array, # this in turn makes quoting "${ESCRIPT_ARGS[@]}" problematic, hence disable SC2068 check here # shellcheck disable=SC2068 ./scripts/update_appup.escript \ --src-dirs "${SRC_DIRS}/**" \ --release-dir "_build/${PROFILE}/lib" \ - --prev-release-dir "${PREV_DIR_BASE}/${PREV_TAG}/emqx/lib" \ + --prev-release-dir "${PREV_REL_DIR}" \ --skip-build \ - ${ESCRIPT_ARGS[@]} "$PREV_VERSION" + ${ESCRIPT_ARGS[@]} "$PREV_TAG" if [ "${IS_CHECK:-}" = 'yes' ]; then diffs="$(git diff --name-only | grep -E '\.appup\.src' || true)" From b8afa16b5322aa9fc57ce9e281c60b4b3706330a Mon Sep 17 00:00:00 2001 From: "Zaiming (Stone) Shi" Date: Thu, 24 Mar 2022 12:28:34 +0100 Subject: [PATCH 4/4] chore: fix shellcheck --- scripts/update-appup.sh | 7 ++----- 1 file changed, 2 insertions(+), 5 deletions(-) diff --git a/scripts/update-appup.sh b/scripts/update-appup.sh index aa5c65282..7c8ef1925 100755 --- a/scripts/update-appup.sh +++ b/scripts/update-appup.sh @@ -16,15 +16,12 @@ cd -P -- "$(dirname -- "${BASH_SOURCE[0]}")/.." PROFILE="${1:-}" case "$PROFILE" in emqx-ee) - DIR='enterprise' TAG_PREFIX='e' ;; emqx) - DIR='broker' TAG_PREFIX='v' ;; emqx-edge) - DIR='edge' TAG_PREFIX='v' ;; *) @@ -86,9 +83,9 @@ fi pushd "${PREV_DIR_BASE}/${PREV_TAG}" git reset --hard -git checkout ${PREV_TAG} +git checkout "${PREV_TAG}" make clean-all -make $PROFILE +make "$PROFILE" popd PREV_REL_DIR="${PREV_DIR_BASE}/${PREV_TAG}/_build/${PROFILE}/lib"