mirror of
https://github.com/hajimehoshi/ebiten.git
synced 2024-12-26 03:38:55 +01:00
docs: Check license year
This commit is contained in:
parent
4322122664
commit
02b1f7d798
@ -25,6 +25,7 @@ import (
|
|||||||
"os/exec"
|
"os/exec"
|
||||||
"path/filepath"
|
"path/filepath"
|
||||||
"regexp"
|
"regexp"
|
||||||
|
"strconv"
|
||||||
"strings"
|
"strings"
|
||||||
"time"
|
"time"
|
||||||
)
|
)
|
||||||
@ -38,7 +39,13 @@ func init() {
|
|||||||
}
|
}
|
||||||
license = strings.TrimSpace(string(b))
|
license = strings.TrimSpace(string(b))
|
||||||
|
|
||||||
// TODO: Year check
|
year, err := strconv.Atoi(regexp.MustCompile(`^Copyright (\d+)`).FindStringSubmatch(license)[1])
|
||||||
|
if err != nil {
|
||||||
|
panic(err)
|
||||||
|
}
|
||||||
|
if year != time.Now().Year() {
|
||||||
|
panic("the license's year is not this year")
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
var copyright = ""
|
var copyright = ""
|
||||||
|
Loading…
Reference in New Issue
Block a user