-
Notifications
You must be signed in to change notification settings - Fork 0
/
main.go
47 lines (39 loc) · 1.02 KB
/
main.go
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
package main
import (
"flag"
"fmt"
"log"
"os"
"github.com/apprehensions/rbxbin"
cs "github.com/apprehensions/rbxweb/clientsettings"
"github.com/vinegarhq/wholesale/internal/factory"
)
func main() {
guid := flag.String("guid", "", "Roblox deployment GUID to retrieve")
channel := flag.String("channel", "LIVE", "Roblox deployment channel for the GUID")
quiet := flag.Bool("quiet", false, "Display progress information")
bin := flag.String("type", "WindowsPlayer", "Roblox BinaryType for the GUID")
flag.Parse()
if len(os.Args) < 2 {
usage()
}
var t cs.BinaryType
switch *bin {
case "WindowsPlayer":
t = cs.WindowsPlayer
case "WindowsStudio64":
t = cs.WindowsStudio64
default:
log.Fatal("Unsupported binary type", *bin,
"must be either WindowsPlayer or WindowsStudio64")
}
d := rbxbin.Deployment{
Type: t,
Channel: *channel,
GUID: *guid,
}
ba := factory.NewBinaryAssembler(d, *quiet, &humanResources{})
buf := ba.Run()
link(buf, fmt.Sprintf(
"%s-%s-%s.zip", d.Type, d.Channel, d.GUID))
}