actions.py 654 B

123456789101112131415161718192021
  1. #!/usr/bin/python
  2. # -*- coding: utf-8 -*-
  3. #
  4. # Licensed under the GNU General Public License, version 3.
  5. # See the file http://www.gnu.org/copyleft/gpl.txt
  6. from pisi.actionsapi import shelltools
  7. from pisi.actionsapi import pisitools
  8. from pisi.actionsapi import get
  9. def build():
  10. shelltools.system("go build \
  11. -trimpath \
  12. -ldflags '-extldflags \"%s\" -X github.com/cli/cli/command.Version=v2.64.0 -X github.com/cli/cli/command.BuildDate=2024-12-31' \
  13. -o 'bin/gh' ./cmd/gh" % get.LDFLAGS())
  14. def install():
  15. shelltools.cd("../cli-2.64.0")
  16. pisitools.insinto("/usr/bin", "bin/gh")
  17. pisitools.dodoc("LICENSE", "README*")