File tree Expand file tree Collapse file tree 1 file changed +7
-2
lines changed Expand file tree Collapse file tree 1 file changed +7
-2
lines changed Original file line number Diff line number Diff line change @@ -175,11 +175,16 @@ deb: source_for_deb ## Packaging for DEB
175
175
176
176
packagecloud : # # Upload archives to PackageCloud
177
177
@echo " $( INFO_COLOR) ==> $( RESET) $( BOLD) Releasing for PackageCloud$( RESET) "
178
- curl -X POST \
178
+ @HTTP_CODE= $$( curl -s -o /dev/null -w "%{http_code}" -X POST \
179
179
-F " package[distro_version_id]=$( shell misc/packagecloud.sh $( DIST_ID) $( DIST_CODENAME) ) " \
180
180
-F " package[package_file]=@builds/$( shell find ./builds -maxdepth 1 -name " *.deb" | head -1 | awk -F ' /' ' {print $$3}' ORS=' ' ) " \
181
181
-H " Authorization: Bearer $( PACKAGECLOUD_TOKEN) " \
182
- https://packagecloud.io/api/v1/repos/linyows/octopass/packages.json
182
+ https://packagecloud.io/api/v1/repos/linyows/octopass/packages.json); \
183
+ if [ " $$ HTTP_CODE" -ne 201 ]; then \
184
+ echo " Upload failed with HTTP status: $$ HTTP_CODE" ; \
185
+ exit 1; \
186
+ fi
187
+ @echo " Upload successful with HTTP status: $$ HTTP_CODE"
183
188
184
189
pkg : clean # # Create some distribution packages
185
190
docker-compose up
You can’t perform that action at this time.
0 commit comments