From aff286807ce2bdfc394c63a40323a4320a2c2426 Mon Sep 17 00:00:00 2001 From: Martin McKeaveney Date: Thu, 27 Jul 2023 10:00:56 +0100 Subject: [PATCH 1/3] fail pipeline if unreleased changes in master --- .../workflows/check_unreleased_changes.yml | 29 +++++++++++++++++++ 1 file changed, 29 insertions(+) create mode 100644 .github/workflows/check_unreleased_changes.yml diff --git a/.github/workflows/check_unreleased_changes.yml b/.github/workflows/check_unreleased_changes.yml new file mode 100644 index 0000000000..2312990c3c --- /dev/null +++ b/.github/workflows/check_unreleased_changes.yml @@ -0,0 +1,29 @@ +name: Check for Unreleased Changes + +on: + pull_request: + branches: + - master + +jobs: + check_unreleased: + runs-on: ubuntu-latest + steps: + - name: Check for unreleased changes + env: + REPO: "Budibase/budibase" + TOKEN: ${{ secrets.GITHUB_TOKEN }} + run: | + RELEASE_TIMESTAMP=$(curl -s -H "Authorization: token $TOKEN" \ + "https://api.github.com/repos/$REPO/releases/latest" | \ + jq -r .published_at) + COMMIT_TIMESTAMP=$(curl -s -H "Authorization: token $TOKEN" \ + "https://api.github.com/repos/$REPO/commits/master" | \ + jq -r .commit.committer.date) + RELEASE_SECONDS=$(date --date="$RELEASE_TIMESTAMP" "+%s") + COMMIT_SECONDS=$(date --date="$COMMIT_TIMESTAMP" "+%s") + if (( COMMIT_SECONDS > RELEASE_SECONDS )); then + echo "There are unreleased changes. Please release these changes before merging." + exit 1 + fi + echo "No unreleased changes detected." From c11706440dc0ff82adf1041a6901ad70a5e914dd Mon Sep 17 00:00:00 2001 From: Martin McKeaveney Date: Thu, 27 Jul 2023 10:27:19 +0100 Subject: [PATCH 2/3] change pipeline name to match filename --- .github/workflows/check_unreleased_changes.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/check_unreleased_changes.yml b/.github/workflows/check_unreleased_changes.yml index 2312990c3c..d558330545 100644 --- a/.github/workflows/check_unreleased_changes.yml +++ b/.github/workflows/check_unreleased_changes.yml @@ -1,4 +1,4 @@ -name: Check for Unreleased Changes +name: check_unreleased_changes on: pull_request: From 4bcffd553b6c74ab187fd88fbbf5ceee8c5e1e46 Mon Sep 17 00:00:00 2001 From: Budibase Staging Release Bot <> Date: Mon, 7 Aug 2023 11:26:25 +0000 Subject: [PATCH 3/3] Bump version to 2.8.32-alpha.2 --- lerna.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lerna.json b/lerna.json index 238a2a2192..f72055b174 100644 --- a/lerna.json +++ b/lerna.json @@ -1,5 +1,5 @@ { - "version": "2.8.32-alpha.1", + "version": "2.8.32-alpha.2", "npmClient": "yarn", "packages": [ "packages/*"