Просмотр исходного кода

For Travis CI - fix non uniq revision deletion list for housekeeping.
[ci package]

Yao Wei Tjong 姚伟忠 11 лет назад
Родитель
Сommit
3eceb385fe
1 измененных файлов с 3 добавлено и 2 удалено
  1. 3 2
      Rakefile

+ 3 - 2
Rakefile

@@ -134,9 +134,10 @@ task :travis_ci_package_upload do
   setup_digital_keys
   setup_digital_keys
   if ENV['RELEASE_TAG'].empty?
   if ENV['RELEASE_TAG'].empty?
     upload_dir = '/home/frs/project/urho3d/Urho3D/Snapshots'
     upload_dir = '/home/frs/project/urho3d/Urho3D/Snapshots'
-    # Only keep the snapshots from the last 30 revisions
+    # Only keep the snapshots from the last +/- 30 revisions
     if ENV['SITE_UPDATE']
     if ENV['SITE_UPDATE']
-      system "for v in $(sftp [email protected] <<EOF |tr ' ' '\n' |grep Urho3D- |cut -d '-' -f1,2 |uniq |tail -n +31
+      # The package revisions and their creation time may not always be in perfect chronological order due to Travis-CI build latency, so sort the final result one more time in order to get a unique revision removal list
+      system "for v in $(sftp [email protected] <<EOF |tr ' ' '\n' |grep Urho3D- |cut -d '-' -f1,2 |uniq |tail -n +31 |sort |uniq
 cd #{upload_dir}
 cd #{upload_dir}
 ls -1t
 ls -1t
 bye
 bye