cert_stub.go 682 B

12345678910111213141516171819202122232425262728293031
  1. // +build !cert
  2. // Copyright 2015 The Gogs Authors. All rights reserved.
  3. // Copyright 2018 Gitote. All rights reserved.
  4. //
  5. // This source code is licensed under the MIT license found in the
  6. // LICENSE file in the root directory of this source tree.
  7. package cmd
  8. import (
  9. "fmt"
  10. "os"
  11. "github.com/urfave/cli"
  12. )
  13. var Cert = cli.Command{
  14. Name: "cert",
  15. Usage: "Generate self-signed certificate",
  16. Description: `Please use build tags "cert" to rebuild Gitote in order to have this ability`,
  17. Action: runCert,
  18. }
  19. func runCert(ctx *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. }