Skip to content
This repository has been archived by the owner on Jul 12, 2022. It is now read-only.

[Feature] Improvements circleci #182

Merged
merged 5 commits into from
Jun 19, 2020
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
7 changes: 2 additions & 5 deletions .circleci/config.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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:
Expand All @@ -433,7 +430,7 @@ workflows:
beta:
triggers:
- schedule:
cron: "0 8 * * 1,4"
cron: "0 11 * * 2,4"
filters:
branches:
only:
Expand Down
15 changes: 8 additions & 7 deletions .circleci/scripts/gonna_release.sh
Original file line number Diff line number Diff line change
Expand Up @@ -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"
DIFF_RESULT=$(git --no-pager log --oneline beta...${DEPLOYED_VERSION})

if [ -z "$DIFF_RESULT" ]
then
echo "ABORT"
else
echo "RELEASE"
fi
5 changes: 5 additions & 0 deletions .circleci/scripts/next_version.sh
Original file line number Diff line number Diff line change
@@ -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}/"
Empty file modified .circleci/scripts/nightly_version_gen.sh
100644 → 100755
Empty file.
8 changes: 4 additions & 4 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -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)
Expand Down Expand Up @@ -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