diff --git a/.circleci/config.yml b/.circleci/config.yml index b4d5ae22b..0d2ad0dd9 100644 --- a/.circleci/config.yml +++ b/.circleci/config.yml @@ -406,14 +406,11 @@ jobs: rit --version rit --version | grep "$RELEASE_VERSION" - - - workflows: release_trigger: triggers: - schedule: - cron: "0 10 * * 1" + cron: "0 13 * * 1" filters: branches: only: @@ -433,7 +430,7 @@ workflows: beta: triggers: - schedule: - cron: "0 8 * * 1,4" + cron: "0 11 * * 2,4" filters: branches: only: diff --git a/.circleci/scripts/gonna_release.sh b/.circleci/scripts/gonna_release.sh index 9b5dd81be..7acd36412 100755 --- a/.circleci/scripts/gonna_release.sh +++ b/.circleci/scripts/gonna_release.sh @@ -2,10 +2,11 @@ DEPLOYED_VERSION=$(curl -s https://commons-repo.ritchiecli.io/stable.txt) -VERSION_TO_CHECK_AGAINST=$(echo "$VERSION_PLACEHOLDER" | sed "s/PLACEHOLDER//") - -if [ "$DEPLOYED_VERSION" == "$VERSION_TO_CHECK_AGAINST" ]; then - echo "RELEASE" -fi - -echo "ABORT" \ No newline at end of file +DIFF_RESULT=$(git --no-pager log --oneline beta...${DEPLOYED_VERSION}) + +if [ -z "$DIFF_RESULT" ] +then + echo "ABORT" +else + echo "RELEASE" +fi \ No newline at end of file diff --git a/.circleci/scripts/next_version.sh b/.circleci/scripts/next_version.sh new file mode 100755 index 000000000..cab1f5359 --- /dev/null +++ b/.circleci/scripts/next_version.sh @@ -0,0 +1,5 @@ +#!/bin/bash + +NEXT_VERSION=$(expr $(curl -s https://commons-repo.ritchiecli.io/stable.txt| rev | cut -d . -f -1|rev) + 1) + +echo "$VERSION_PLACEHOLDER" | sed "s/PLACEHOLDER/.${NEXT_VERSION}/" \ No newline at end of file diff --git a/.circleci/scripts/nightly_version_gen.sh b/.circleci/scripts/nightly_version_gen.sh old mode 100644 new mode 100755 diff --git a/Makefile b/Makefile index 6d2646cc5..eb8d23278 100644 --- a/Makefile +++ b/Makefile @@ -31,7 +31,7 @@ COMMONS_REPO_URL=https://commons-repo.ritchiecli.io/tree/tree.json IS_RELEASE=$(shell echo $(VERSION) | egrep "^[0-9.]+|qa-.*") IS_BETA=$(shell echo $(VERSION) | egrep "^beta-.*") GONNA_RELEASE=$(shell ./.circleci/scripts/gonna_release.sh) -VERSION_TO_CHECK_AGAINST=$(shell echo $VERSION_PLACEHOLDER | sed "s/PLACEHOLDER//") +NEXT_VERSION=$(shell ./.circleci/scripts/next-version.sh) build: mkdir -p $(DIST_MAC_TEAM) $(DIST_MAC_SINGLE) $(DIST_LINUX_TEAM) $(DIST_LINUX_SINGLE) $(DIST_WIN_TEAM) $(DIST_WIN_SINGLE) @@ -141,8 +141,8 @@ release-creator: ifeq "$(GONNA_RELEASE)" "RELEASE" git config --global user.email "$(GIT_EMAIL)" git config --global user.name "$(GIT_NAME)" - git checkout -b "release-$(VERSION_TO_CHECK_AGAINST)" + git checkout -b "release-$(NEXT_VERSION)" git add . - git commit --allow-empty -m "release-$(VERSION_TO_CHECK_AGAINST)" - git push $(GIT_REMOTE) HEAD:release-$(VERSION_TO_CHECK_AGAINST) + git commit --allow-empty -m "release-$(NEXT_VERSION)" + git push $(GIT_REMOTE) HEAD:release-$(NEXT_VERSION) endif \ No newline at end of file