We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent 69d7ff8 commit 0a8ddb8Copy full SHA for 0a8ddb8
1 file changed
docs-post
@@ -10,13 +10,14 @@ DEST_URL=http://localhost/docs-manager.php
10
#@TODO: Run the appropriate command to generate docs if output path is not already populated.
11
12
SRC_DIR=tmp/coverage/html
13
-TMP_FILE=tmp/upload.zip
14
PROJECT_NAME=${PROJECT_NAME}-coverage
15
16
-zip -rq9 "$TMP_FILE" "$SRC_DIR"
17
-curl \
18
- -FauthToken=$TOKEN \
19
- -FprojectName=$PROJECT_NAME \
20
- -Ffile=@"$TMP_FILE;type=application/zip" \
+# This ensures no intermediate directories are stored in the ZIP file.
+cd "$SRC_DIR"
+
+# Send the POST request, using ZIP data fed from stdin
+zip -rq8 - * | curl \
+ -F "authToken=$TOKEN" \
21
+ -F "projectName=$PROJECT_NAME" \
22
+ -F "file=@-;filename=upload.zip;type=application/zip" \
23
$DEST_URL
-rm -f $TMP_FILE
0 commit comments