3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
|
# File 'lib/style_pusher/utils/git_driver.rb', line 3
def self.push(url:, local_repo:, branch_name:, project_name:, stylesheets:, upload_location:, commit_message:)
git = create_or_pull(local_path: local_repo, url: url, project_name: project_name)
git.branch(branch_name).checkout
upload_stylesheets(stylesheets, upload_location)
git.add
git.commit(commit_message)
git.push("origin", branch_name, f: true)
git.checkout("master")
git.branch(branch_name).delete
end
|