6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
|
# File 'lib/ruflet/cli/build_command.rb', line 6
def command_build(args)
platform = (args.shift || "").downcase
if platform.empty?
warn "Usage: ruflet build <apk|ios|aab|web|macos|windows|linux>"
return 1
end
flutter_cmd = flutter_build_command(platform)
unless flutter_cmd
warn "Unsupported build target: #{platform}"
return 1
end
client_dir = detect_flutter_client_dir
unless client_dir
warn "Could not find Flutter client directory."
warn "Set RUFLET_CLIENT_DIR or place client at ./ruflet_client"
return 1
end
ok = system(*flutter_cmd, chdir: client_dir)
ok ? 0 : 1
end
|