You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

30 lines
716 B

10 years ago
10 years ago
10 years ago
10 years ago
10 years ago
9 years ago
10 years ago
10 years ago
10 years ago
  1. // +build !cert
  2. // Copyright 2009 The Go Authors. All rights reserved.
  3. // Copyright 2014 The Gogs Authors. All rights reserved.
  4. // Use of this source code is governed by a MIT-style
  5. // license that can be found in the LICENSE file.
  6. package cmd
  7. import (
  8. "fmt"
  9. "os"
  10. "github.com/urfave/cli"
  11. )
  12. // CmdCert represents the available cert sub-command.
  13. var CmdCert = cli.Command{
  14. Name: "cert",
  15. Usage: "Generate self-signed certificate",
  16. Description: `Please use build tags "cert" to rebuild Gogs in order to have this ability`,
  17. Action: runCert,
  18. }
  19. func runCert(*cli.Context) error {
  20. fmt.Println("Command cert not available, please use build tags 'cert' to rebuild.")
  21. os.Exit(1)
  22. return nil
  23. }