2019-05-27 18:01:53 +08:00
|
|
|
//go:generate go run assets-generator.go
|
|
|
|
|
2018-01-26 18:40:01 +08:00
|
|
|
package main
|
|
|
|
|
2019-05-21 11:31:40 +08:00
|
|
|
import (
|
|
|
|
"github.com/go-shiori/shiori/internal/cmd"
|
2023-07-17 21:30:18 +08:00
|
|
|
"github.com/go-shiori/shiori/internal/model"
|
2019-05-21 11:31:40 +08:00
|
|
|
"github.com/sirupsen/logrus"
|
2023-07-17 21:30:18 +08:00
|
|
|
|
2019-08-09 11:19:43 +08:00
|
|
|
// Database driver
|
2019-08-10 09:13:13 +08:00
|
|
|
_ "github.com/go-sql-driver/mysql"
|
2019-09-25 00:59:25 +08:00
|
|
|
_ "github.com/lib/pq"
|
2023-03-17 20:37:23 +08:00
|
|
|
_ "modernc.org/sqlite"
|
2019-08-09 11:19:43 +08:00
|
|
|
|
2019-05-27 18:01:53 +08:00
|
|
|
// Add this to prevent it removed by go mod tidy
|
|
|
|
_ "github.com/shurcooL/vfsgen"
|
2019-05-21 11:31:40 +08:00
|
|
|
)
|
|
|
|
|
2023-07-17 21:30:18 +08:00
|
|
|
var (
|
|
|
|
version = "dev"
|
|
|
|
commit = "none"
|
|
|
|
date = "unknown"
|
|
|
|
)
|
|
|
|
|
|
|
|
func init() {
|
|
|
|
// Set globally
|
2023-07-21 15:25:19 +08:00
|
|
|
model.BuildVersion = version
|
|
|
|
model.BuildCommit = commit
|
|
|
|
model.BuildDate = date
|
2023-07-17 21:30:18 +08:00
|
|
|
}
|
|
|
|
|
2018-05-01 11:23:38 +08:00
|
|
|
func main() {
|
2019-08-09 11:19:43 +08:00
|
|
|
err := cmd.ShioriCmd().Execute()
|
2019-05-22 00:24:11 +08:00
|
|
|
if err != nil {
|
|
|
|
logrus.Fatalln(err)
|
|
|
|
}
|
2018-03-05 08:14:58 +08:00
|
|
|
}
|