@@ -75,6 +75,11 @@ def build_bundle(libs, bundle_version, output_filename,
75
75
with open (os .path .join (build_lib_dir , "VERSIONS.txt" ), "w" ) as f :
76
76
f .write (bundle_version + "\r \n " )
77
77
versions = subprocess .run ('git submodule foreach \" git remote get-url origin && git describe --tags\" ' , shell = True , stdout = subprocess .PIPE )
78
+ if versions .returncode != 0 :
79
+ print ("Failed to generate versions file. Its likely a library hasn't been "
80
+ "released yet." )
81
+ success = False
82
+
78
83
repo = None
79
84
for line in versions .stdout .split (b"\n " ):
80
85
if line .startswith (b"Entering" ) or not line :
@@ -86,6 +91,10 @@ def build_bundle(libs, bundle_version, output_filename,
86
91
else :
87
92
f .write (repo .decode ("utf-8" , "strict" ) + "/releases/tag/" + line .strip ().decode ("utf-8" , "strict" ) + "\r \n " )
88
93
94
+ if not success :
95
+ print ("WARNING: some failures above" )
96
+ sys .exit (2 )
97
+
89
98
print ()
90
99
print ("Zipping" )
91
100
@@ -106,9 +115,6 @@ def build_bundle(libs, bundle_version, output_filename,
106
115
print ()
107
116
print (total_size , "B" , total_size / 1024 , "kiB" , total_size / 1024 / 1024 , "MiB" )
108
117
print ("Bundled in" , output_filename )
109
- if not success :
110
- print ("WARNING: some failures above" )
111
- sys .exit (2 )
112
118
113
119
def _find_libraries (current_path , depth ):
114
120
if depth <= 0 :
@@ -131,7 +137,6 @@ def build_bundles(filename_prefix, output_directory, library_location, library_d
131
137
bundle_version = build .version_string ()
132
138
133
139
libs = _find_libraries (os .path .abspath (library_location ), library_depth )
134
- print (libs )
135
140
136
141
pkg = pkg_resources .get_distribution ("circuitpython-build-tools" )
137
142
build_tools_version = "devel"
0 commit comments