Skip to content

Commit

Permalink
[HOTFIX-#264] Cherry-Pick FEAT-#257
Browse files Browse the repository at this point in the history
  • Loading branch information
brainbot-devops committed Sep 5, 2019
1 parent 4f8e437 commit 2ad4606
Show file tree
Hide file tree
Showing 2 changed files with 10 additions and 5 deletions.
11 changes: 8 additions & 3 deletions .circleci/scripts/bump-part.py
Original file line number Diff line number Diff line change
@@ -1,5 +1,4 @@
import os
import pathlib
import subprocess

import requests
Expand Down Expand Up @@ -27,6 +26,12 @@
exit()


def get_last_tag():
return subprocess.run(
"git describe --tags".split(" "), check=True, stdout=subprocess.PIPE
).stdout.decode("UTF-8")


part = ""
bump_release_type = None
if CURRENT_BRANCH == "dev":
Expand Down Expand Up @@ -83,9 +88,9 @@
)

if CURRENT_BRANCH == "master" and COMMIT_TYPE == "RELEASE":
r = subprocess.run(f"git --git-dir={PROJECT_GIT_DIR} describe --abbrev=0 --tags".split(" "), check=True, stdout=subprocess.PIPE)
r = subprocess.run(f"git --git-dir={PROJECT_GIT_DIR} describe --abbrev=0 --tags", check=True)
tag = r.stdout.decode("UTF-8").strip(" ").strip("\n")
make_chlog(pathlib.Path(f"{PROJECT_ROOT}/CHANGES.rst"), new_version=tag)
make_chlog(Path(f"{PROJECT_ROOT}/CHANGES.rst"), new_version=tag)

print("Push Bump commit..")
subprocess.run(
Expand Down
4 changes: 2 additions & 2 deletions .circleci/scripts/chlogger.py
Original file line number Diff line number Diff line change
Expand Up @@ -130,8 +130,8 @@ def make_chlog(chlog_path, new_version):
"0.4.0", format_commits(feats), format_commits(fixes), format_commits(hotfixes), chlog_path
)

subprocess.run(f"git --git-dir={PROJECT_GIT_DIR} add {chlog_path}".split(" "), check=True)
subprocess.run(f"git --git-dir={PROJECT_GIT_DIR} git add CHANGELOG.rst".split(" "), check=True)
subprocess.run(
f"git --git-dir={PROJECT_GIT_DIR} commit {chlog_path} -m".split(" ") + ['"Update Changelog."'],
f"git --git-dir={PROJECT_GIT_DIR} git commit CHANGELOG.rst -m \"Update Changelog.\"".split(" "),
check=True
)

0 comments on commit 2ad4606

Please sign in to comment.