| 136 | |
| 137 | |
| 138 | def parse_arguments(): |
| 139 | parser = ArgumentParser() |
| 140 | |
| 141 | parser.add_argument( |
| 142 | '-a', |
| 143 | '--architectures', |
| 144 | choices=[*SUPPORTED_ARCHES, 'all'], |
| 145 | default=SUPPORTED_ARCHES, |
| 146 | help='The architectures to build images for. Defaults to all supported architectures.', |
| 147 | nargs='+', |
| 148 | ) |
| 149 | parser.add_argument( |
| 150 | '-e', |
| 151 | '--edit-config', |
| 152 | action='store_true', |
| 153 | help='Edit configuration file and run savedefconfig on result', |
| 154 | ) |
| 155 | parser.add_argument( |
| 156 | '-r', |
| 157 | '--release', |
| 158 | action='store_true', |
| 159 | help=f"Create a release on GitHub (tag: {RELEASE_TAG})", |
| 160 | ) |
| 161 | parser.add_argument( |
| 162 | '-s', |
| 163 | '--savedefconfig', |
| 164 | action='store_true', |
| 165 | help='Run savedefconfig after configuration stage', |
| 166 | ) |
| 167 | |
| 168 | return parser.parse_args() |
| 169 | |
| 170 | |
| 171 | def main(): |