diff --git a/.circleci/config.yml b/.circleci/config.yml index fbd09b295..a8d051e74 100644 --- a/.circleci/config.yml +++ b/.circleci/config.yml @@ -2,6 +2,13 @@ version: 2.1 setup: true +on_main_or_tag_filter: &on_main_or_tag_filter + filters: + branches: + only: main + tags: + only: /^v.+/ + on_tag_filter: &on_tag_filter filters: branches: @@ -95,11 +102,9 @@ workflows: - gh-release: <<: *on_tag_filter - ui-build: - <<: *on_tag_filter - requires: - - gh-release + <<: *on_main_or_tag_filter - publish: - <<: *on_tag_filter + <<: *on_main_or_tag_filter requires: - ui-build - trigger_private_renovate: diff --git a/.circleci/continue_config.yml b/.circleci/continue_config.yml index 60db6b569..40b4ced62 100644 --- a/.circleci/continue_config.yml +++ b/.circleci/continue_config.yml @@ -215,6 +215,8 @@ jobs: command: | echo 'export COMMIT_MESSAGE="$(git log --format=%s -n 1 $CIRCLE_SHA1)"' >> "$BASH_ENV" echo 'export FORMATTED_COMMIT_MESSAGE="${COMMIT_MESSAGE//\"/\\\"}"' >> "$BASH_ENV" + # returns a version string like 0.1.0.dev11 + echo 'export PACKAGE_VERSION="$(git describe --tags --exact-match --abbrev=0 2>/dev/null || echo "$(git describe --tags --abbrev=0 | sed 's/^v//').dev$(git rev-list $(git describe --tags --abbrev=0)..HEAD --count)")"' >> "$BASH_ENV" source "$BASH_ENV" curl --request POST \ --url $TOBIKO_PRIVATE_CIRCLECI_URL \ @@ -229,6 +231,7 @@ jobs: "sqlmesh_commit_author":"'$CIRCLE_USERNAME'", "sqlmesh_commit_hash":"'$CIRCLE_SHA1'", "sqlmesh_commit_message":"'"$FORMATTED_COMMIT_MESSAGE"'" + "sqlmesh_package_version":"'$PACKAGE_VERSION'" } }'