summaryrefslogtreecommitdiff
path: root/lib
diff options
context:
space:
mode:
authorEugen Wissner <belka@caraus.de>2021-04-02 08:10:48 +0200
committerEugen Wissner <belka@caraus.de>2021-04-02 08:11:05 +0200
commit7949c74d9afa7c79025f56aa08a5a75939818b40 (patch)
tree55cf6b70b1cffc7e79d66edd57bc6c4bc2346bcb /lib
parent960927954168dd5d7e63ce619b4df20efd82390a (diff)
downloadslackbuilder-7949c74d9afa7c79025f56aa08a5a75939818b40.tar.gz
Move branch constant into configuration
Diffstat (limited to 'lib')
-rw-r--r--lib/download.rb12
1 files changed, 5 insertions, 7 deletions
diff --git a/lib/download.rb b/lib/download.rb
index 2f002d2..cb09c42 100644
--- a/lib/download.rb
+++ b/lib/download.rb
@@ -8,8 +8,6 @@ require_relative '../config/config'
require_relative 'package'
require 'net/http'
-MY_BRANCH = 'user/belka/updates'
-
def write_download(target, response)
checksum = Digest::MD5.new
@@ -135,11 +133,11 @@ end
def commit(package_path, version)
message = "#{package_path}: Updated for version #{version}"
- unless system('git', '-C', 'slackbuilds', 'checkout', MY_BRANCH,
+ unless system('git', '-C', 'slackbuilds', 'checkout', CONFIG[:branch],
err: '/dev/null')
- sh "git -C slackbuilds checkout -b #{MY_BRANCH} master"
+ sh 'git', '-C', 'slackbuilds', 'checkout', '-b', CONFIG[:branch], 'master'
end
- sh "git -C slackbuilds add #{package_path}"
- sh %(git -C slackbuilds commit -S -m "#{message}")
- # sh "git -C slackbuilds push origin #{branch}"
+ sh 'git', '-C', 'slackbuilds', 'add', package_path
+ sh 'git', '-C', 'slackbuilds', 'commit', '-S', '-m', message
+ # sh 'git', '-C', 'slackbuilds', 'push', 'origin', CONFIG[:branch]
end