Commit 1ae340d
committed
Improve snapshot deployment timestamp detection
This hopefully fixes an issue where the status table was erroneously
categorizing many components as "Cut" even though nothing changed.
Previously, we looked in G/A/maven-metadata.xml at the
<versioning><lastUpdated> tag value. However, that tag value is
sometimes updated even when no new snapshot has been deployed.
I am not certain why -- perhaps certain Nexus scheduled tasks
touch this value after refreshing indices, etc.?
For example, as of this writing, net.imagej:ij1-patcher's newest
snapshot (1.0.2-SNAPSHOT) was deployed at 20190930134831, but the
lastUpdate tag of G/A/maven-metadata.xml is 20191006010052.
The new detection strategy is a two-step process:
1. Extract the latest snapshot version from <versioning><latest>
of G/A/maven-metadata.xml.
2. Extract its timestamp from <versioning><snapshot><timestamp>
of G/A/V/maven-metadata.xml.
Other strategies considered but discarded:
- Use the Last-Updated value of G/A/maven-metadata.xml.
When browsing the remote directory listing, the value appears
correct. But `curl -I` on the file yields a too-recent value.
- Use the Last-Updated value of G/A/V/maven-metadata.xml.
This might work -- both the remote directory listing and `curl -I`
request yields the correct value -- but it feels more ironclad to
me to rely on file _contents_ here rather than file metadata.1 parent 2106118 commit 1ae340d
1 file changed
+40
-26
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
11 | 11 | | |
12 | 12 | | |
13 | 13 | | |
14 | | - | |
| 14 | + | |
15 | 15 | | |
16 | 16 | | |
17 | 17 | | |
| |||
24 | 24 | | |
25 | 25 | | |
26 | 26 | | |
27 | | - | |
28 | | - | |
29 | | - | |
| 27 | + | |
| 28 | + | |
| 29 | + | |
| 30 | + | |
30 | 31 | | |
31 | 32 | | |
32 | | - | |
33 | | - | |
34 | | - | |
| 33 | + | |
| 34 | + | |
| 35 | + | |
35 | 36 | | |
36 | 37 | | |
37 | 38 | | |
| |||
49 | 50 | | |
50 | 51 | | |
51 | 52 | | |
52 | | - | |
| 53 | + | |
53 | 54 | | |
54 | | - | |
| 55 | + | |
55 | 56 | | |
56 | 57 | | |
57 | 58 | | |
| |||
60 | 61 | | |
61 | 62 | | |
62 | 63 | | |
63 | | - | |
64 | | - | |
65 | | - | |
66 | | - | |
67 | | - | |
68 | | - | |
| 64 | + | |
| 65 | + | |
| 66 | + | |
| 67 | + | |
| 68 | + | |
| 69 | + | |
| 70 | + | |
| 71 | + | |
| 72 | + | |
| 73 | + | |
| 74 | + | |
| 75 | + | |
| 76 | + | |
| 77 | + | |
| 78 | + | |
| 79 | + | |
| 80 | + | |
| 81 | + | |
| 82 | + | |
69 | 83 | | |
70 | 84 | | |
71 | | - | |
| 85 | + | |
72 | 86 | | |
73 | | - | |
| 87 | + | |
74 | 88 | | |
75 | | - | |
| 89 | + | |
76 | 90 | | |
77 | 91 | | |
78 | 92 | | |
79 | | - | |
80 | | - | |
81 | | - | |
82 | | - | |
83 | | - | |
84 | | - | |
| 93 | + | |
| 94 | + | |
| 95 | + | |
| 96 | + | |
| 97 | + | |
| 98 | + | |
85 | 99 | | |
86 | 100 | | |
87 | 101 | | |
88 | 102 | | |
89 | 103 | | |
90 | 104 | | |
91 | 105 | | |
92 | | - | |
93 | | - | |
| 106 | + | |
| 107 | + | |
94 | 108 | | |
95 | 109 | | |
96 | 110 | | |
| |||
0 commit comments