mirror of
https://github.com/amineo/t2-stat-parser.git
synced 2026-07-11 06:14:34 +00:00
Refactor build steps
This commit is contained in:
parent
d17efed959
commit
964b024b02
7 changed files with 57 additions and 21 deletions
|
|
@ -11,10 +11,6 @@ Parser for DarkTiger's T2 Server Stats
|
|||
|
||||
package main
|
||||
|
||||
import (
|
||||
_ "github.com/amineo/t2-stat-parser"
|
||||
)
|
||||
|
||||
func main() {
|
||||
init()
|
||||
initParser()
|
||||
}
|
||||
|
|
|
|||
|
|
@ -9,7 +9,7 @@ Parser for DarkTiger's T2 Server Stats
|
|||
- Ability to download stat files from remote server via FTP
|
||||
*/
|
||||
|
||||
package parser
|
||||
package main
|
||||
|
||||
import (
|
||||
"bufio"
|
||||
|
|
@ -69,7 +69,7 @@ type Game struct {
|
|||
uuid string `db.games:"uuid"`
|
||||
}
|
||||
|
||||
func init() {
|
||||
func initParser() {
|
||||
start := time.Now()
|
||||
flag.Parse()
|
||||
var err error
|
||||
|
|
|
|||
15
app/t2-stats/start.sh
Executable file
15
app/t2-stats/start.sh
Executable file
|
|
@ -0,0 +1,15 @@
|
|||
#!/bin/sh
|
||||
|
||||
echo "starting..";
|
||||
|
||||
echo "Checking if build exists.."
|
||||
if [ -f /app/main ]
|
||||
then
|
||||
echo "Build found!"
|
||||
/app/main
|
||||
else
|
||||
echo "No build found, running from source"
|
||||
go run *.go
|
||||
fi
|
||||
|
||||
|
||||
Loading…
Add table
Add a link
Reference in a new issue