Skip to content

Commit

Permalink
Updating deploy script to allow for partial deployments (i.e. if only…
Browse files Browse the repository at this point in the history
… some of our repos change between releases)
  • Loading branch information
jonoomph committed Jul 10, 2024
1 parent a0fee0c commit 637beec
Showing 1 changed file with 12 additions and 12 deletions.
24 changes: 12 additions & 12 deletions installer/deploy.py
Original file line number Diff line number Diff line change
Expand Up @@ -106,9 +106,12 @@ def main():
release_git_sha = version_info.get('openshot-qt', {}).get('CI_COMMIT_SHA', 'N/A')

# Verify branch names are all the same (across the 3 repos)
# Ignore "develop" branches (since sometimes we have no changes in one or more repos)
original_git_branch = ''
for repo_name in repo_names:
git_branch_name = version_info.get(repo_name, {}).get('CI_COMMIT_REF_NAME')
if git_branch_name == 'develop':
continue
if not original_git_branch:
original_git_branch = git_branch_name
if original_git_branch != git_branch_name:
Expand All @@ -128,6 +131,9 @@ def main():
raise Exception("Version cannot contain a '-' character: %s (repo: %s, branch: %s)" %
(github_release_name, repo_name, git_branch_name))

if git_branch_name == 'develop':
output(f"Skipping develop branch for repo: {repo_name}")
continue
if git_branch_name.startswith("release"):
# Get official version release (i.e. v2.1.0, v2.x.x)
releases[repo_name] = get_release(repos.get(repo_name), github_release_name)
Expand All @@ -140,10 +146,7 @@ def main():
)
else:
# ignore all branches that don't start with 'release*'
raise Exception(
"%s only allowed for branch names that start with 'release*'"
" (repo: %s, branch: %s)" % (
script_mode, repo_name, git_branch_name))
raise Exception("%s only allowed for branch names that start with 'release*' (repo: %s, branch: %s)" % (script_mode, repo_name, git_branch_name))

if not is_publish:

Expand All @@ -167,19 +170,16 @@ def main():
if so_number:
so_title = ", SO: %s" % so_number
log_markdown = "%s Changelog (Version: %s%s)\n---\n%s\n\n" % (
repo_name,
version_info.get(repo_name, {}).get('VERSION'),
so_title,
logs.get(repo_name))
repo_name, version_info.get(repo_name, {}).get('VERSION'), so_title, logs.get(repo_name))
formatted_logs[repo_name] = log_title + log_markdown
combined_log_markdown += log_markdown
if not repo_name == "openshot-qt":
formatted_logs[repo_name] = log_title + log_markdown
formatted_logs["openshot-qt"] = log_title + combined_log_markdown

# Create GitHub Release (if needed)
for repo_name in repo_names:
# If NO release is found, create a new one
git_branch_name = version_info.get(repo_name, {}).get('CI_COMMIT_REF_NAME')
if git_branch_name == 'develop':
continue
# If NO release is found, create a new one
github_release_name = "v%s" % version_info.get(repo_name, {}).get('VERSION')
if not releases.get(repo_name):
# Create a new release if one if missing (for each repo)
Expand Down

0 comments on commit 637beec

Please sign in to comment.