Jelajahi Sumber

travis -> drone

tobiaskaminsky 8 tahun lalu
induk
melakukan
8d1621bc44
1 mengubah file dengan 5 tambahan dan 8 penghapusan
  1. 5 8
      scripts/lint/lint-up.rb

+ 5 - 8
scripts/lint/lint-up.rb

@@ -9,7 +9,7 @@ git_user, git_token, git_branch = ARGV
 # ========================  SETUP ============================
 
 # User name for git commits made by this script.
-TRAVIS_GIT_USERNAME = String.new("Travis CI server")
+TRAVIS_GIT_USERNAME = String.new("Drone CI server")
 
 # File name and relative path of generated Lint report. Must match build.gradle file:
 #   lintOptions {
@@ -148,7 +148,7 @@ end
 # either error count or warning count DECREASED
 
 # write new results to file (will overwrite existing, or create new)
-File.write(previous_lint_report, "DO NOT TOUCH; GENERATED BY TRAVIS\n" + error_warning_string)
+File.write(previous_lint_report, "DO NOT TOUCH; GENERATED BY DRONE\n" + error_warning_string)
 
 # push changes to github (if this script is run locally, we don't want to overwrite git username and email, so save temporarily)
 previous_git_username, st = Open3.capture2('git config user.name')
@@ -166,13 +166,10 @@ system ("git remote add origin https://" + git_user + ":" + git_token + "@github
 # add previous Lint result file to git
 system ('git add ' + PREVIOUS_LINT_RESULTS_FILE)
 
-# Travis has git in a detached head here. Let's get on the right branch.
-travis_branch_name = ENV['TRAVIS_BRANCH']
-if travis_branch_name != nil
-    system ('git checkout ' + git_branch)
-end
+# Use right branch.
+system ('git checkout ' + git_branch)
 
-# commit changes; Add "skip ci" so that we don't accidentally trigger another Travis build
+# commit changes; Add "skip ci" so that we don't accidentally trigger another Drone build
 system ('git commit -m "Drone: update Lint results to reflect reduced error/warning count [skip ci]" ')
 
 # push to origin