|
|
@ -1,3 +1,20 @@ |
|
|
|
#!/usr/bin/env python |
|
|
|
# |
|
|
|
# Copyright (C) 2020 by Maxim Prokhorov <prokhorov dot max at outlook dot com> |
|
|
|
# |
|
|
|
# This program is free software: you can redistribute it and/or modify |
|
|
|
# it under the terms of the GNU General Public License as published by |
|
|
|
# the Free Software Foundation, either version 3 of the License, or |
|
|
|
# (at your option) any later version. |
|
|
|
# |
|
|
|
# This program is distributed in the hope that it will be useful, |
|
|
|
# but WITHOUT ANY WARRANTY; without even the implied warranty of |
|
|
|
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the |
|
|
|
# GNU General Public License for more details. |
|
|
|
# |
|
|
|
# You should have received a copy of the GNU General Public License |
|
|
|
# along with this program. If not, see <http://www.gnu.org/licenses/>. |
|
|
|
|
|
|
|
import os |
|
|
|
import argparse |
|
|
|
import re |
|
|
@ -79,7 +96,7 @@ def generate_lines(builds, ignore): |
|
|
|
flags.append('PLATFORMIO_BUILD_FLAGS="{}"'.format(build.build_flags)) |
|
|
|
if build.src_build_flags: |
|
|
|
flags.append('ESPURNA_FLAGS="{}"'.format(build.src_build_flags)) |
|
|
|
flags.append('ESPURNA_NAME="{env}"'.format(env=build.env)) |
|
|
|
flags.append('ESPURNA_RELEASE_NAME="{env}"'.format(env=build.env)) |
|
|
|
|
|
|
|
cmd = ["env"] |
|
|
|
cmd.extend(flags) |
|
|
@ -110,7 +127,8 @@ if __name__ == "__main__": |
|
|
|
raise ValueError("* Not in CI *") |
|
|
|
|
|
|
|
parser = argparse.ArgumentParser() |
|
|
|
parser.add_argument("version") |
|
|
|
parser.add_argument("--version", required=True) |
|
|
|
parser.add_argument("--destination", required=True) |
|
|
|
parser.add_argument("--ignore", action="append") |
|
|
|
args = parser.parse_args() |
|
|
|
|
|
|
@ -127,8 +145,9 @@ if __name__ == "__main__": |
|
|
|
|
|
|
|
print("#!/bin/bash") |
|
|
|
print("set -e -x") |
|
|
|
print('export ESPURNA_VERSION="{}"'.format(args.version)) |
|
|
|
print('trap "ls -l ${TRAVIS_BUILD_DIR}/firmware/${ESPURNA_VERSION}" EXIT') |
|
|
|
print('export ESPURNA_RELEASE_VERSION="{}"'.format(args.version)) |
|
|
|
print('export ESPURNA_RELEASE_DESTINATION="{}"'.format(args.destination)) |
|
|
|
print('trap "ls -l ${ESPURNA_RELEASE_DESTINATION}" EXIT') |
|
|
|
print( |
|
|
|
'echo "Selected thread #{} out of {}"'.format( |
|
|
|
builder_thread + 1, builder_total_threads |
|
|
|