When I tried to run the following code, the index.js turned out to be corrupted and if the upload is unparalleled, the process of uploading looks fine. Please help me with a solution.
gzip dist/production/index.js
mv dist/production/index.js.gz dist/production/index.js
s3cmd --access_key="$S3_ACCESS_KEY" --secret_key="$S3_SECRET_KEY" \
--acl-public --no-mime-magic --progress --recursive \
--exclude "dist/production/index.js" \
put dist/production/
"s3://${BUCKET}/something/${BUILD_IDENTIFIER}/production/" &
s3cmd --access_key="$S3_ACCESS_KEY" --secret_key="$S3_SECRET_KEY" \
--acl-public --no-mime-magic --progress --recursive \
--add-header="Content-Encoding:gzip" \
put dist/production/index.js
"s3://${BUCKET}/something/${BUILD_IDENTIFIER}/production/" &
wait