~ci-train-bot/goget-ubuntu-touch/goget-ubuntu-touch-ubuntu-artful-2836

« back to all changes in this revision

Viewing changes to ubuntu-device-flash/touch.go

  • Committer: Łukasz 'sil2100' Zemczak
  • Date: 2016-06-13 14:19:39 UTC
  • mfrom: (220.2.1 goget-ubuntu-touch)
  • Revision ID: lukasz.zemczak@canonical.com-20160613141939-nzcsmjwjfth7mve7
Add a warning label for devel channel usage in touch, change the default channel to stable/ubuntu.

Show diffs side-by-side

added added

removed removed

Lines of Context:
41
41
        CustomTarball string `long:"custom-tarball" description:"Specify a local custom tarball to override the one from the server (using official Ubuntu images with different custom tarballs)"`
42
42
        RunScript     string `long:"run-script" description:"Run a script given by path to finish the flashing process, instead of rebooting to recovery (mostly used during development to work around quirky or incomplete recovery images)"`
43
43
        Password      string `long:"password" description:"This sets up the default password for the phablet user. This option is meant for CI and not general use"`
44
 
        Channel       string `long:"channel" description:"Specify the channel to use" default:"ubuntu-touch/stable"`
 
44
        Channel       string `long:"channel" description:"Specify the channel to use" default:"ubuntu-touch/stable/ubuntu"`
45
45
        Device        string `long:"device" description:"Specify the device to flash"`
46
46
        RecoveryImage string `long:"recovery-image" description:"Specify the recovery image file to use when flashing, overriding the one from the device tarball (useful if the latter has no adb enabled)"`
47
47
        fastboot      devices.Fastboot
116
116
                fmt.Println("WARNING: --adb-keys is dangerous, potentially authorising multiple cliets to connect to your device")
117
117
        }
118
118
 
 
119
        // print out a conditional warning for devel* channel usage
 
120
        if strings.HasPrefix(touchCmd.Channel, "ubuntu-touch/devel") {
 
121
                fmt.Println("WARNING You are about to flash your phone with a development image - continue at your own risk! There is absolutely no guarantee that even the most basic phone functions will work.")
 
122
        }
 
123
 
119
124
        var deviceTarballPath string
120
125
        if touchCmd.DeviceTarball != "" {
121
126
                p, err := expandFile(touchCmd.DeviceTarball)