aboutsummaryrefslogtreecommitdiffstats
path: root/skate
diff options
context:
space:
mode:
authorMartin Czygan <martin.czygan@gmail.com>2021-07-19 20:10:31 +0200
committerMartin Czygan <martin.czygan@gmail.com>2021-07-19 20:10:31 +0200
commit704c9f6e8d978b3187bd9d77a55f40aabf0ac1c3 (patch)
tree18ea1785e16b2ddafa748a9b3d6ab07a2f90365d /skate
parentf1542ba4d5ee7e6cd63e1de3a393e4cd591f72f1 (diff)
downloadrefcat-704c9f6e8d978b3187bd9d77a55f40aabf0ac1c3.tar.gz
refcat-704c9f6e8d978b3187bd9d77a55f40aabf0ac1c3.zip
reduce: temp fix 0 source release year
Diffstat (limited to 'skate')
-rw-r--r--skate/reduce.go5
1 files changed, 4 insertions, 1 deletions
diff --git a/skate/reduce.go b/skate/reduce.go
index 8658ffe..8913cae 100644
--- a/skate/reduce.go
+++ b/skate/reduce.go
@@ -382,7 +382,10 @@ func ZippyWayback(refs, cdx io.Reader, w io.Writer) error {
bref.SourceReleaseIdent = ref.ReleaseIdent
bref.SourceWorkIdent = ref.WorkIdent
bref.SourceReleaseStage = ref.ReleaseStage
- bref.SourceYear = fmt.Sprintf("%d", ref.ReleaseYear)
+ // TODO: track down the 0 year docs.
+ if ref.ReleaseYear > 1800 {
+ bref.SourceYear = fmt.Sprintf("%d", ref.ReleaseYear)
+ }
bref.RefIndex = ref.Index + 1 // we want 1-index (also helps with omitempty)
bref.RefKey = ref.Key
if cdx.NumRows == 0 {