aboutsummaryrefslogtreecommitdiffstats
path: root/build/ci.go
diff options
context:
space:
mode:
authorPéter Szilágyi <peterke@gmail.com>2018-07-25 22:51:24 +0800
committerPéter Szilágyi <peterke@gmail.com>2018-07-25 23:04:43 +0800
commit6b232ce3252c6823ac84cd3d2256340f981cd387 (patch)
tree78ec24d6836fb981addafbf0013c40be0568f0a8 /build/ci.go
parent7abedf9bbb725da8d610762d051af43085be1cda (diff)
downloaddexon-6b232ce3252c6823ac84cd3d2256340f981cd387.tar
dexon-6b232ce3252c6823ac84cd3d2256340f981cd387.tar.gz
dexon-6b232ce3252c6823ac84cd3d2256340f981cd387.tar.bz2
dexon-6b232ce3252c6823ac84cd3d2256340f981cd387.tar.lz
dexon-6b232ce3252c6823ac84cd3d2256340f981cd387.tar.xz
dexon-6b232ce3252c6823ac84cd3d2256340f981cd387.tar.zst
dexon-6b232ce3252c6823ac84cd3d2256340f981cd387.zip
internal, vendor: update Azure blobstore API
Diffstat (limited to 'build/ci.go')
-rw-r--r--build/ci.go13
1 files changed, 2 insertions, 11 deletions
diff --git a/build/ci.go b/build/ci.go
index 29b43783c..7d22b5255 100644
--- a/build/ci.go
+++ b/build/ci.go
@@ -1018,23 +1018,14 @@ func doPurge(cmdline []string) {
}
for i := 0; i < len(blobs); i++ {
for j := i + 1; j < len(blobs); j++ {
- iTime, err := time.Parse(time.RFC1123, blobs[i].Properties.LastModified)
- if err != nil {
- log.Fatal(err)
- }
- jTime, err := time.Parse(time.RFC1123, blobs[j].Properties.LastModified)
- if err != nil {
- log.Fatal(err)
- }
- if iTime.After(jTime) {
+ if blobs[i].Properties.LastModified.After(blobs[j].Properties.LastModified) {
blobs[i], blobs[j] = blobs[j], blobs[i]
}
}
}
// Filter out all archives more recent that the given threshold
for i, blob := range blobs {
- timestamp, _ := time.Parse(time.RFC1123, blob.Properties.LastModified)
- if time.Since(timestamp) < time.Duration(*limit)*24*time.Hour {
+ if time.Since(blob.Properties.LastModified) < time.Duration(*limit)*24*time.Hour {
blobs = blobs[:i]
break
}