Lines Matching +full:python3 +full:- +full:github

1 #!/usr/bin/env python3
2 # ===-- github-upload-release.py ------------------------------------------===#
6 # SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception
8 # ===------------------------------------------------------------------------===#
10 # Create and manage releases in the llvm github project.
12 # This script requires python3 and the PyGithub module.
16 # You will need to obtain a personal access token for your github account in
18 # https://help.github.com/en/articles/creating-a-personal-access-token-for-the-command-line
21 # ./github-upload-release.py --token $github_token --release 8.0.1-rc4 create
24 # ./github-upload-release.py --token $github_token --release 8.0.1-rc4 upload --files llvm-8.0.1rc4…
27 # ./github-upload-release.py --token $github_token --release 8.0.1-rc4 upload --files *.src.*
28 # ===------------------------------------------------------------------------===#
32 import github
39 tag = "llvmorg-{}".format(release)
64 release = repo.get_release("llvmorg-{}".format(release))
73 "command", type=str, choices=["create", "upload", "check-permissions"]
77 parser.add_argument("--token", type=str)
78 parser.add_argument("--release", type=str)
79 parser.add_argument("--user", type=str)
80 parser.add_argument("--user-token", type=str)
83 parser.add_argument("--files", nargs="+", type=str)
87 gh = github.Github(args.token)
89 llvm_repo = llvm_org.get_repo("llvm-project")
93 print("--user-token option required when --user is used")
98 github.Github(args.user_token)
100 .get_team_by_slug("llvm-release-managers")
105 elif args.command == "check-permissions":
106 print("--user option required for check-permissions")