Skip to content

Commit

Permalink
remove is_ci
Browse files Browse the repository at this point in the history
  • Loading branch information
kshann committed Nov 23, 2024
1 parent 88c20bb commit b542c50
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 17 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -26,13 +26,13 @@ def self.run(params)
)
end

options[:version] = new_version
options[:release_branch_name] = release_branch_name
# options[:version] = new_version
# options[:release_branch_name] = release_branch_name

release_task_id = Helper::AsanaHelper.create_release_task(options[:platform], options[:version], options[:asana_user_id], options[:asana_access_token], is_hotfix: options[:is_hotfix])
options[:release_task_id] = release_task_id
# release_task_id = Helper::AsanaHelper.create_release_task(options[:platform], options[:version], options[:asana_user_id], options[:asana_access_token], is_hotfix: options[:is_hotfix])
# options[:release_task_id] = release_task_id

Helper::AsanaHelper.update_asana_tasks_for_internal_release(options) unless params[:is_hotfix]
# Helper::AsanaHelper.update_asana_tasks_for_internal_release(options) unless params[:is_hotfix]
end

def self.description
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -150,18 +150,9 @@ def self.create_hotfix_branch(platform, source_version, new_version)

existing_branch = Actions.sh("git", "branch", "--list", branch_name).strip
UI.abort_with_message!("Branch #{branch_name} already exists in this repository. Aborting.") unless existing_branch.empty?

if Helper.is_ci?
sha = Actions.sh("git", "rev-parse", "#{source_version}^{}").strip
repo = Helper::GitHelper.repo_name(platform)
Actions.sh("gh", "api", "--method", "POST", "/repos/#{repo}/git/refs", "-f", "ref=refs/heads/#{branch_name}", "-f", "sha=#{sha}")
Actions.sh("git", "fetch", "origin")
Actions.sh("git", "checkout", branch_name)
else
Actions.sh("git", "fetch", "--tags")
Actions.sh("git", "checkout", "-b", branch_name, source_version)
Actions.sh("git", "push", "-u", "origin", branch_name)
end
Actions.sh("git", "fetch", "--tags")
Actions.sh("git", "checkout", "-b", branch_name, source_version)
Actions.sh("git", "push", "-u", "origin", branch_name)
branch_name
end

Expand Down

0 comments on commit b542c50

Please sign in to comment.