mirror of
https://github.com/hajimehoshi/ebiten.git
synced 2025-01-12 03:58:55 +01:00
docs: Update
This commit is contained in:
parent
da662b384c
commit
88e488a5a6
13
_docs/gen.go
13
_docs/gen.go
@ -27,29 +27,20 @@ import (
|
|||||||
"strconv"
|
"strconv"
|
||||||
"strings"
|
"strings"
|
||||||
"sync"
|
"sync"
|
||||||
|
|
||||||
"github.com/hajimehoshi/ebiten/internal"
|
|
||||||
)
|
)
|
||||||
|
|
||||||
const (
|
const (
|
||||||
url = "https://hajimehoshi.github.io/ebiten/"
|
url = "https://hajimehoshi.github.io/ebiten/"
|
||||||
|
licenseYear = 2013
|
||||||
)
|
)
|
||||||
|
|
||||||
var (
|
var (
|
||||||
examplesDir = filepath.Join("public", "examples")
|
examplesDir = filepath.Join("public", "examples")
|
||||||
copyright = ""
|
copyright = fmt.Sprintf("© %d Hajime Hoshi", licenseYear)
|
||||||
stableVersion = ""
|
stableVersion = ""
|
||||||
devVersion = ""
|
devVersion = ""
|
||||||
)
|
)
|
||||||
|
|
||||||
func init() {
|
|
||||||
year, err := internal.LicenseYear()
|
|
||||||
if err != nil {
|
|
||||||
panic(err)
|
|
||||||
}
|
|
||||||
copyright = fmt.Sprintf("© %d Hajime Hoshi", year)
|
|
||||||
}
|
|
||||||
|
|
||||||
func init() {
|
func init() {
|
||||||
b, err := exec.Command("git", "tag").Output()
|
b, err := exec.Command("git", "tag").Output()
|
||||||
if err != nil {
|
if err != nil {
|
||||||
|
@ -35,7 +35,7 @@
|
|||||||
</div></header>
|
</div></header>
|
||||||
|
|
||||||
<main><div class="container">
|
<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>
|
<h2 id="platforms">Platforms</h2>
|
||||||
<dl class="row">
|
<dl class="row">
|
||||||
|
@ -40,15 +40,3 @@ func LicenseComment() (string, error) {
|
|||||||
lines := strings.Split(license, "\n")
|
lines := strings.Split(license, "\n")
|
||||||
return "// " + strings.Join(lines[:len(lines)-1], "\n// "), nil
|
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