mirror of
https://github.com/hajimehoshi/ebiten.git
synced 2024-11-10 04:57:26 +01:00
docs: Update
This commit is contained in:
parent
da662b384c
commit
88e488a5a6
15
_docs/gen.go
15
_docs/gen.go
@ -27,29 +27,20 @@ import (
|
||||
"strconv"
|
||||
"strings"
|
||||
"sync"
|
||||
|
||||
"github.com/hajimehoshi/ebiten/internal"
|
||||
)
|
||||
|
||||
const (
|
||||
url = "https://hajimehoshi.github.io/ebiten/"
|
||||
url = "https://hajimehoshi.github.io/ebiten/"
|
||||
licenseYear = 2013
|
||||
)
|
||||
|
||||
var (
|
||||
examplesDir = filepath.Join("public", "examples")
|
||||
copyright = ""
|
||||
copyright = fmt.Sprintf("© %d Hajime Hoshi", licenseYear)
|
||||
stableVersion = ""
|
||||
devVersion = ""
|
||||
)
|
||||
|
||||
func init() {
|
||||
year, err := internal.LicenseYear()
|
||||
if err != nil {
|
||||
panic(err)
|
||||
}
|
||||
copyright = fmt.Sprintf("© %d Hajime Hoshi", year)
|
||||
}
|
||||
|
||||
func init() {
|
||||
b, err := exec.Command("git", "tag").Output()
|
||||
if err != nil {
|
||||
|
@ -35,7 +35,7 @@
|
||||
</div></header>
|
||||
|
||||
<main><div class="container">
|
||||
<p>Stable version: v1.7.1 / Development version: v1.8.0-alpha</p>
|
||||
<p>Stable version: v1.7.2 / Development version: v1.8.0-alpha</p>
|
||||
|
||||
<h2 id="platforms">Platforms</h2>
|
||||
<dl class="row">
|
||||
|
@ -40,15 +40,3 @@ func LicenseComment() (string, error) {
|
||||
lines := strings.Split(license, "\n")
|
||||
return "// " + strings.Join(lines[:len(lines)-1], "\n// "), nil
|
||||
}
|
||||
|
||||
func LicenseYear() (int, error) {
|
||||
license, err := LicenseComment()
|
||||
if err != nil {
|
||||
return 0, err
|
||||
}
|
||||
year, err := strconv.Atoi(regexp.MustCompile(`^// Copyright (\d+)`).FindStringSubmatch(license)[1])
|
||||
if err != nil {
|
||||
return 0, err
|
||||
}
|
||||
return year, nil
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user