diff --git a/.drone.yml b/.drone.yml index 719647e4..52b56f9b 100644 --- a/.drone.yml +++ b/.drone.yml @@ -35,7 +35,7 @@ publish: password: $$DOCKER_PASS email: $$DOCKER_EMAIL repo: drone/drone - tag: [ "latest" ] + tag: [ "latest", "0.4.2" ] when: repo: drone/drone branch: master diff --git a/drone/server/server.go b/drone/server/server.go index 551507a4..e22be946 100644 --- a/drone/server/server.go +++ b/drone/server/server.go @@ -2,6 +2,7 @@ package server import ( "net/http" + "os" "time" "github.com/drone/drone/router" @@ -48,11 +49,26 @@ var ServeCmd = cli.Command{ Name: "experimental", Usage: "start the server with experimental features", }, + cli.BoolFlag{ + Name: "agreement.ack", + EnvVar: "I_UNDERSTAND_I_AM_USING_AN_UNSTABLE_VERSION", + Usage: "agree to terms of use.", + }, + cli.BoolFlag{ + Name: "agreement.fix", + EnvVar: "I_AGREE_TO_FIX_BUGS_AND_NOT_FILE_BUGS", + Usage: "agree to terms of use.", + }, }, } func start(c *cli.Context) error { + if c.Bool("agreement.ack") == false || c.Bool("agreement.fix") == false { + println(agreement) + os.Exit(1) + } + // debug level if requested by user if c.Bool("debug") { logrus.SetLevel(logrus.DebugLevel) @@ -87,3 +103,28 @@ func start(c *cli.Context) error { handler, ) } + +var agreement = ` +--- + + +You are attempting to use the unstable channel. This build is experimental and +has known bugs and compatibility issues, and is not intended for general use. + +Please consider using the latest stable release instead: + + drone/drone:0.4.2 + +If you are attempting to build from source please use the latest stable tag: + + v0.4.2 + +If you are interested in testing this experimental build and assisting with +development you will need to set the following environment variables to proceed: + + I_UNDERSTAND_I_AM_USING_AN_UNSTABLE_VERSION=true + I_AGREE_TO_FIX_BUGS_AND_NOT_FILE_BUGS=true + + +--- +`