/
packaging.go
112 lines (93 loc) · 2.8 KB
/
packaging.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
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
package cmd
import (
"github.com/spf13/cobra"
"github.com/go-flutter-desktop/hover/cmd/packaging"
)
func init() {
initPackagingCmd.AddCommand(initLinuxSnapCmd)
initPackagingCmd.AddCommand(initLinuxDebCmd)
initPackagingCmd.AddCommand(initLinuxAppImageCmd)
initPackagingCmd.AddCommand(initLinuxRpmCmd)
initPackagingCmd.AddCommand(initLinuxPkgCmd)
initPackagingCmd.AddCommand(initWindowsMsiCmd)
initPackagingCmd.AddCommand(initDarwinBundleCmd)
initPackagingCmd.AddCommand(initDarwinPkgCmd)
initPackagingCmd.AddCommand(initDarwinDmgCmd)
rootCmd.AddCommand(initPackagingCmd)
}
var initPackagingCmd = &cobra.Command{
Use: "init-packaging",
Short: "Create configuration files for a packaging format",
}
var initLinuxSnapCmd = &cobra.Command{
Use: "linux-snap",
Short: "Create configuration files for snap packaging",
Run: func(cmd *cobra.Command, args []string) {
assertHoverInitialized()
packaging.LinuxSnapTask.Init()
},
}
var initLinuxDebCmd = &cobra.Command{
Use: "linux-deb",
Short: "Create configuration files for deb packaging",
Run: func(cmd *cobra.Command, args []string) {
assertHoverInitialized()
packaging.LinuxDebTask.Init()
},
}
var initLinuxAppImageCmd = &cobra.Command{
Use: "linux-appimage",
Short: "Create configuration files for AppImage packaging",
Run: func(cmd *cobra.Command, args []string) {
assertHoverInitialized()
packaging.LinuxAppImageTask.Init()
},
}
var initLinuxRpmCmd = &cobra.Command{
Use: "linux-rpm",
Short: "Create configuration files for rpm packaging",
Run: func(cmd *cobra.Command, args []string) {
assertHoverInitialized()
packaging.LinuxRpmTask.Init()
},
}
var initLinuxPkgCmd = &cobra.Command{
Use: "linux-pkg",
Short: "Create configuration files for pacman pkg packaging",
Run: func(cmd *cobra.Command, args []string) {
assertHoverInitialized()
packaging.LinuxPkgTask.Init()
},
}
var initWindowsMsiCmd = &cobra.Command{
Use: "windows-msi",
Short: "Create configuration files for msi packaging",
Run: func(cmd *cobra.Command, args []string) {
assertHoverInitialized()
packaging.WindowsMsiTask.Init()
},
}
var initDarwinBundleCmd = &cobra.Command{
Use: "darwin-bundle",
Short: "Create configuration files for OSX bundle packaging",
Run: func(cmd *cobra.Command, args []string) {
assertHoverInitialized()
packaging.DarwinBundleTask.Init()
},
}
var initDarwinPkgCmd = &cobra.Command{
Use: "darwin-pkg",
Short: "Create configuration files for OSX pkg installer packaging",
Run: func(cmd *cobra.Command, args []string) {
assertHoverInitialized()
packaging.DarwinPkgTask.Init()
},
}
var initDarwinDmgCmd = &cobra.Command{
Use: "darwin-dmg",
Short: "Create configuration files for OSX dmg packaging",
Run: func(cmd *cobra.Command, args []string) {
assertHoverInitialized()
packaging.DarwinDmgTask.Init()
},
}