|
|
@@ -603,12 +603,12 @@ task :ci_package_upload do
|
|
|
# Download source packages from GitHub
|
|
|
system "export SNAPSHOT_VER=$(git describe $TRAVIS_COMMIT |ruby -pe 'gsub(/-(?!g)/, %q{.})'); wget -q https://github.com/$TRAVIS_REPO_SLUG/tarball/$TRAVIS_COMMIT -O Urho3D-$SNAPSHOT_VER-Source-snapshot.tar.gz && wget -q https://github.com/$TRAVIS_REPO_SLUG/zipball/$TRAVIS_COMMIT -O Urho3D-$SNAPSHOT_VER-Source-snapshot.zip" or abort 'Failed to get source packages'
|
|
|
# Only keep the snapshots from the last 30 revisions
|
|
|
- system "for v in $(sftp [email protected] <<EOF |tr ' ' '\n' |grep Urho3D- |cut -d '-' -f1,2 |uniq |tail -n +31
|
|
|
+ system "for v in $(sftp [email protected] <<EOF |tr ' ' '\n' |grep Urho3D- |cut -d '-' -f1,2 |uniq |tail -n +11
|
|
|
cd #{upload_dir}
|
|
|
-ls -1r
|
|
|
+ls -1t
|
|
|
bye
|
|
|
EOF
|
|
|
-); do echo rm #{upload_dir}/${v}*; done |sftp -b - [email protected] >/dev/null 2>&1" or abort 'Failed to housekeep snapshots'
|
|
|
+); do echo rm #{upload_dir}/${v}-*; done |sftp -b - [email protected] >/dev/null 2>&1" or abort 'Failed to housekeep snapshots'
|
|
|
end
|
|
|
else
|
|
|
upload_dir = "/home/frs/project/#{repo}/#{ENV['RELEASE_TAG']}"
|