Skip to content

Commit 553d902

Browse files
authored
Merge pull request #525 from rsteube/flutter-inconsistent-build-cmds
flutter: build - inconsistent subcommand documentation
2 parents 814bea2 + 96403a6 commit 553d902

File tree

5 files changed

+209
-0
lines changed

5 files changed

+209
-0
lines changed
Lines changed: 39 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,39 @@
1+
package cmd
2+
3+
import (
4+
"github.com/rsteube/carapace"
5+
"github.com/spf13/cobra"
6+
)
7+
8+
var build_fuchsiaCmd = &cobra.Command{
9+
Use: "fuchsia",
10+
Short: "Build the Fuchsia target",
11+
Run: func(cmd *cobra.Command, args []string) {},
12+
}
13+
14+
func init() {
15+
carapace.Gen(build_fuchsiaCmd).Standalone()
16+
17+
build_fuchsiaCmd.Flags().String("dart-define", "", "Additional key-value pairs that will be available as constants.")
18+
build_fuchsiaCmd.Flags().Bool("debug", false, "Build a debug version of your app.")
19+
build_fuchsiaCmd.Flags().BoolP("help", "h", false, "Print this usage information.")
20+
build_fuchsiaCmd.Flags().Bool("no-null-assertions", false, "Perform additional null assertions on the boundaries of migrated and un-migrated code.")
21+
build_fuchsiaCmd.Flags().Bool("no-tree-shake-icons", false, "Do not tree shake icon fonts so that only glyphs used by the application remain.")
22+
build_fuchsiaCmd.Flags().Bool("null-assertions", false, "Perform additional null assertions on the boundaries of migrated and un-migrated code.")
23+
build_fuchsiaCmd.Flags().Bool("profile", false, "Build a version of your app specialized for performance profiling.")
24+
build_fuchsiaCmd.Flags().Bool("release", false, "Build a release version of your app (default mode).")
25+
build_fuchsiaCmd.Flags().String("runner-source", "", "The package source to use for the flutter_runner.")
26+
build_fuchsiaCmd.Flags().StringP("target", "t", "", "The main entry-point file of the application, as run on the device.")
27+
build_fuchsiaCmd.Flags().String("target-platform", "", "The target platform for which the app is compiled.")
28+
build_fuchsiaCmd.Flags().Bool("tree-shake-icons", false, "Tree shake icon fonts so that only glyphs used by the application remain.")
29+
buildCmd.AddCommand(build_fuchsiaCmd)
30+
31+
carapace.Gen(build_fuchsiaCmd).FlagCompletion(carapace.ActionMap{
32+
"runner-source": carapace.ActionValuesDescribed(
33+
"fuchsia.com", "runner already on the device",
34+
"flutter_tool", "runner distributed with Flutter",
35+
),
36+
"target": carapace.ActionFiles(".dart"),
37+
"target-platform": carapace.ActionValues("fuchsia-arm64", "fuchsia-x64"),
38+
})
39+
}
Lines changed: 44 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,44 @@
1+
package cmd
2+
3+
import (
4+
"github.com/rsteube/carapace"
5+
"github.com/spf13/cobra"
6+
)
7+
8+
var build_linuxCmd = &cobra.Command{
9+
Use: "linux",
10+
Short: "Build a Linux desktop application",
11+
Run: func(cmd *cobra.Command, args []string) {},
12+
}
13+
14+
func init() {
15+
carapace.Gen(build_linuxCmd).Standalone()
16+
17+
build_linuxCmd.Flags().Bool("analyze-size", false, "Whether to produce additional profile information for artifact output size.")
18+
build_linuxCmd.Flags().String("dart-define", "", "Additional key-value pairs that will be available as constants.")
19+
build_linuxCmd.Flags().Bool("debug", false, "Build a debug version of your app.")
20+
build_linuxCmd.Flags().BoolP("help", "h", false, "Print this usage information.")
21+
build_linuxCmd.Flags().Bool("no-analyze-size", false, "Whether to produce additional profile information for artifact output size.")
22+
build_linuxCmd.Flags().Bool("no-null-assertions", false, "Do not perform additional null assertions on the boundaries of migrated and un-migrated code.")
23+
build_linuxCmd.Flags().Bool("no-obfuscate", false, "In a release build, this flag does not removes identifiers and replaces them with randomized values.")
24+
build_linuxCmd.Flags().Bool("no-pub", false, "Do not run \"flutter pub get\" before executing this command.")
25+
build_linuxCmd.Flags().Bool("no-track-widget-creation", false, "Do no track widget creation locations.")
26+
build_linuxCmd.Flags().Bool("no-tree-shake-icons", false, "Do not tree shake icon fonts so that only glyphs used by the application remain.")
27+
build_linuxCmd.Flags().Bool("null-assertions", false, "Perform additional null assertions on the boundaries of migrated and un-migrated code.")
28+
build_linuxCmd.Flags().Bool("obfuscate", false, "In a release build, this flag removes identifiers and replaces them with randomized values.")
29+
build_linuxCmd.Flags().Bool("profile", false, "Build a version of your app specialized for performance profiling.")
30+
build_linuxCmd.Flags().Bool("pub", false, "Run \"flutter pub get\" before executing this command.")
31+
build_linuxCmd.Flags().Bool("release", false, "Build a release version of your app (default mode).")
32+
build_linuxCmd.Flags().String("split-debug-info", "", "In a release build, this flag reduces application size by storing Dart program symbols in a separate file on the host rather than in the application.")
33+
build_linuxCmd.Flags().StringP("target", "t", "", "The main entry-point file of the application, as run on the device.")
34+
build_linuxCmd.Flags().String("target-platform", "", "The target platform for which the app is compiled.")
35+
build_linuxCmd.Flags().String("target-sysroot", "", "The root filesystem path of target platform for which the app is compiled.")
36+
build_linuxCmd.Flags().Bool("track-widget-creation", false, "Track widget creation locations.")
37+
build_linuxCmd.Flags().Bool("tree-shake-icons", false, "Tree shake icon fonts so that only glyphs used by the application remain.")
38+
buildCmd.AddCommand(build_linuxCmd)
39+
40+
carapace.Gen(build_linuxCmd).FlagCompletion(carapace.ActionMap{
41+
"target": carapace.ActionFiles(".dart"),
42+
"target-platform": carapace.ActionValues("linux-arm64", "linux-x64"),
43+
})
44+
}
Lines changed: 41 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,41 @@
1+
package cmd
2+
3+
import (
4+
"github.com/rsteube/carapace"
5+
"github.com/spf13/cobra"
6+
)
7+
8+
var build_windowsCmd = &cobra.Command{
9+
Use: "windows",
10+
Short: "Build a Windows desktop application",
11+
Run: func(cmd *cobra.Command, args []string) {},
12+
}
13+
14+
func init() {
15+
carapace.Gen(build_windowsCmd).Standalone()
16+
17+
build_windowsCmd.Flags().Bool("analyze-size", false, "Produce additional profile information for artifact output size.")
18+
build_windowsCmd.Flags().String("dart-define", "", "Additional key-value pairs that will be available as constants.")
19+
build_windowsCmd.Flags().Bool("debug", false, "Build a debug version of your app.")
20+
build_windowsCmd.Flags().BoolP("help", "h", false, "Print this usage information.")
21+
build_windowsCmd.Flags().Bool("no-analyze-size", false, "Do not produce additional profile information for artifact output size.")
22+
build_windowsCmd.Flags().Bool("no-null-assertions", false, "Do not perform additional null assertions on the boundaries of migrated and un-migrated code.")
23+
build_windowsCmd.Flags().Bool("no-obfuscate", false, "In a release build, this flag does not removes identifiers and replaces them with randomized values for the purposes of source code obfuscation.")
24+
build_windowsCmd.Flags().Bool("no-pub", false, "Do not run \"flutter pub get\" before executing this command.")
25+
build_windowsCmd.Flags().Bool("no-track-widget-creation", false, "Do not track widget creation locations.")
26+
build_windowsCmd.Flags().Bool("no-tree-shake-icons", false, "Do not tree shake icon fonts so that only glyphs used by the application remain.")
27+
build_windowsCmd.Flags().Bool("null-assertions", false, "Perform additional null assertions on the boundaries of migrated and un-migrated code.")
28+
build_windowsCmd.Flags().Bool("obfuscate", false, "In a release build, this flag removes identifiers and replaces them with randomized values for the purposes of source code obfuscation.")
29+
build_windowsCmd.Flags().Bool("profile", false, "Build a version of your app specialized for performance profiling.")
30+
build_windowsCmd.Flags().Bool("pub", false, "Run \"flutter pub get\" before executing this command.")
31+
build_windowsCmd.Flags().Bool("release", false, "Build a release version of your app (default mode).")
32+
build_windowsCmd.Flags().String("split-debug-info", "", "In a release build, this flag reduces application size by storing Dart program symbols in a separate file on the host rather than in the application.")
33+
build_windowsCmd.Flags().StringP("target", "t", "", "The main entry-point file of the application, as run on the device.")
34+
build_windowsCmd.Flags().Bool("track-widget-creation", false, "Track widget creation locations.")
35+
build_windowsCmd.Flags().Bool("tree-shake-icons", false, "Tree shake icon fonts so that only glyphs used by the application remain.")
36+
buildCmd.AddCommand(build_windowsCmd)
37+
38+
carapace.Gen(build_windowsCmd).FlagCompletion(carapace.ActionMap{
39+
"target": carapace.ActionFiles(".dart"),
40+
})
41+
}
Lines changed: 41 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,41 @@
1+
package cmd
2+
3+
import (
4+
"github.com/rsteube/carapace"
5+
"github.com/spf13/cobra"
6+
)
7+
8+
var build_winuwpCmd = &cobra.Command{
9+
Use: "winuwp",
10+
Short: "Build a Windows UWP desktop application",
11+
Run: func(cmd *cobra.Command, args []string) {},
12+
}
13+
14+
func init() {
15+
carapace.Gen(build_winuwpCmd).Standalone()
16+
17+
build_winuwpCmd.Flags().Bool("analyze-size", false, "Produce additional profile information for artifact output size.")
18+
build_winuwpCmd.Flags().String("dart-define", "", "Additional key-value pairs that will be available as constants.")
19+
build_winuwpCmd.Flags().Bool("debug", false, "Build a debug version of your app.")
20+
build_winuwpCmd.Flags().BoolP("help", "h", false, "Print this usage information.")
21+
build_winuwpCmd.Flags().Bool("no-analyze-size", false, "Do not produce additional profile information for artifact output size.")
22+
build_winuwpCmd.Flags().Bool("no-null-assertions", false, "Do not perform additional null assertions on the boundaries of migrated and un-migrated code.")
23+
build_winuwpCmd.Flags().Bool("no-obfuscate", false, "In a release build, this flag does not removes identifiers and replaces them with randomized values for the purposes of source code obfuscation.")
24+
build_winuwpCmd.Flags().Bool("no-pub", false, "Do not run \"flutter pub get\" before executing this command.")
25+
build_winuwpCmd.Flags().Bool("no-track-widget-creation", false, "Do not track widget creation locations.")
26+
build_winuwpCmd.Flags().Bool("no-tree-shake-icons", false, "Do not tree shake icon fonts so that only glyphs used by the application remain.")
27+
build_winuwpCmd.Flags().Bool("null-assertions", false, "Perform additional null assertions on the boundaries of migrated and un-migrated code.")
28+
build_winuwpCmd.Flags().Bool("obfuscate", false, "In a release build, this flag removes identifiers and replaces them with randomized values for the purposes of source code obfuscation.")
29+
build_winuwpCmd.Flags().Bool("profile", false, "Build a version of your app specialized for performance profiling.")
30+
build_winuwpCmd.Flags().Bool("pub", false, "Run \"flutter pub get\" before executing this command.")
31+
build_winuwpCmd.Flags().Bool("release", false, "Build a release version of your app (default mode).")
32+
build_winuwpCmd.Flags().String("split-debug-info", "", "In a release build, this flag reduces application size by storing Dart program symbols in a separate file on the host rather than in the application.")
33+
build_winuwpCmd.Flags().StringP("target", "t", "", "The main entry-point file of the application, as run on the device.")
34+
build_winuwpCmd.Flags().Bool("track-widget-creation", false, "Track widget creation locations.")
35+
build_winuwpCmd.Flags().Bool("tree-shake-icons", false, "Tree shake icon fonts so that only glyphs used by the application remain.")
36+
buildCmd.AddCommand(build_winuwpCmd)
37+
38+
carapace.Gen(build_winuwpCmd).FlagCompletion(carapace.ActionMap{
39+
"target": carapace.ActionFiles(".dart"),
40+
})
41+
}
Lines changed: 44 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,44 @@
1+
package cmd
2+
3+
import (
4+
"github.com/rsteube/carapace"
5+
"github.com/spf13/cobra"
6+
)
7+
8+
var build_xcarchiveCmd = &cobra.Command{
9+
Use: "xcarchive",
10+
Short: "Build an iOS archive bundle",
11+
Run: func(cmd *cobra.Command, args []string) {},
12+
}
13+
14+
func init() {
15+
carapace.Gen(build_xcarchiveCmd).Standalone()
16+
17+
build_xcarchiveCmd.Flags().Bool("analyze-size", false, "Produce additional profile information for artifact output size.")
18+
build_xcarchiveCmd.Flags().String("build-name", "", "A \"x.y.z\" string used as the version number shown to users.")
19+
build_xcarchiveCmd.Flags().String("build-number", "", "An identifier used as an internal version number.")
20+
build_xcarchiveCmd.Flags().String("dart-define", "", "Additional key-value pairs that will be available as constants.")
21+
build_xcarchiveCmd.Flags().Bool("debug", false, "Build a debug version of your app.")
22+
build_xcarchiveCmd.Flags().String("export-options-plist", "", "Optionally export an IPA with these options.")
23+
build_xcarchiveCmd.Flags().Bool("flavor", false, "Build a custom app flavor as defined by platform-specific build setup.")
24+
build_xcarchiveCmd.Flags().BoolP("help", "h", false, "Print this usage information.")
25+
build_xcarchiveCmd.Flags().Bool("no-analyze-size", false, "Do not produce additional profile information for artifact output size.")
26+
build_xcarchiveCmd.Flags().Bool("no-null-assertions", false, "Do not perform additional null assertions on the boundaries of migrated and un-migrated code.")
27+
build_xcarchiveCmd.Flags().Bool("no-obfuscate", false, "In a release build, this flag does not removes identifiers and replaces them with randomized values for the purposes of source code obfuscation.")
28+
build_xcarchiveCmd.Flags().Bool("no-pub", false, "Do not run \"flutter pub get\" before executing this command.")
29+
build_xcarchiveCmd.Flags().Bool("no-tree-shake-icons", false, "Do not tree shake icon fonts so that only glyphs used by the application remain.")
30+
build_xcarchiveCmd.Flags().Bool("null-assertions", false, "Perform additional null assertions on the boundaries of migrated and un-migrated code.")
31+
build_xcarchiveCmd.Flags().Bool("obfuscate", false, "In a release build, this flag removes identifiers and replaces them with randomized values for the purposes of source code obfuscation.")
32+
build_xcarchiveCmd.Flags().Bool("profile", false, "Build a version of your app specialized for performance profiling.")
33+
build_xcarchiveCmd.Flags().Bool("pub", false, "Run \"flutter pub get\" before executing this command.")
34+
build_xcarchiveCmd.Flags().Bool("release", false, "Build a release version of your app (default mode).")
35+
build_xcarchiveCmd.Flags().String("split-debug-info", "", "In a release build, this flag reduces application size by storing Dart program symbols in a separate file on the host rather than in the application.")
36+
build_xcarchiveCmd.Flags().StringP("target", "t", "", "The main entry-point file of the application, as run on the device.")
37+
build_xcarchiveCmd.Flags().Bool("tree-shake-icons", false, "Tree shake icon fonts so that only glyphs used by the application remain.")
38+
buildCmd.AddCommand(build_xcarchiveCmd)
39+
40+
carapace.Gen(build_xcarchiveCmd).FlagCompletion(carapace.ActionMap{
41+
"export-options-plist": carapace.ActionFiles(),
42+
"target": carapace.ActionFiles(".dart"),
43+
})
44+
}

0 commit comments

Comments
 (0)