Skip to content

Commit c3ef02a

Browse files
authored
Merge pull request #629 from pulp/update-ci/main
Update CI files for branch main
2 parents 1a9930b + 0202f87 commit c3ef02a

File tree

3 files changed

+4
-14
lines changed

3 files changed

+4
-14
lines changed

.github/template_gitref

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1 +1 @@
1-
2021.08.26-249-gca8f021
1+
2021.08.26-250-gf4315cf

.github/workflows/release.yml

Lines changed: 0 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,6 @@ on:
1212
inputs:
1313
release:
1414
description: "Release tag (e.g. 3.2.1)"
15-
required: true
1615
before_script:
1716
description: |
1817
Bash code to run before bindings and docs are built. This should only be used when re-running
@@ -287,9 +286,5 @@ jobs:
287286
echo "GH Issues $GH_ISSUES"
288287
python .ci/scripts/update_github.py
289288
290-
- name: Tweet
291-
continue-on-error: true
292-
run: python .ci/scripts/tweet.py ${{ github.event.inputs.release }}
293-
294289
- name: Create release on GitHub
295290
run: bash .github/workflows/scripts/create_release_from_tag.sh ${{ github.event.inputs.release }}

.github/workflows/scripts/release.py

Lines changed: 3 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -10,6 +10,7 @@
1010
import os
1111
import textwrap
1212
import requests
13+
import subprocess
1314

1415
from git import Repo
1516
from pathlib import Path
@@ -152,14 +153,8 @@ def main():
152153
release_path = os.path.dirname(os.path.abspath(__file__))
153154
plugin_path = release_path.split("/.github")[0]
154155

155-
version = None
156-
with open(f"{plugin_path}/setup.py") as fp:
157-
for line in fp.readlines():
158-
if "version=" in line:
159-
version = re.split("\"|'", line)[1]
160-
if not version:
161-
raise RuntimeError("Could not detect existing version ... aborting.")
162-
release_version = version.replace(".dev", "")
156+
output = subprocess.check_output(["bump2version", "--dry-run", "--list", "release"])
157+
release_version = re.findall(r"\nnew_version=([0-9.]*)\n", output.decode())[0]
163158

164159
print(f"\n\nRepo path: {plugin_path}")
165160
repo = Repo(plugin_path)

0 commit comments

Comments
 (0)