Travis skips encoding when loading into S3 bucket

I upload some .js files to the s3 bucket via Travis, one of the files has the following regex:

/(^[a-zA-ZàáâäãåąčćęèéêëėįìíîïłńòóôöõøùúûüųūÿýżźñçčšžÀÁÂÄÃÅĄĆČĖĘÈÉÊËÌÍÎÏĮŁŃÒÓÔÖÕØÙÚÛÜŲŪŸÝŻŹÑßÇŒÆČŠŽ∂ð ,.'-]+)/ 

The Travis.yml file is super simple:

 - provider: s3 access_key_id: THEKEY secret_access_key: secure: THESECUREDKEY bucket: my-bucket local-dir: build skip_cleanup: true on: branch: master acl: public_read 

Nothing strange, but after loading, I get the following result inside the .js containing this regular expression (instead of the regular expression that I set):

 /(^[a-zA-Zà áâäãåąÄćęèéêëėįìÃîïłńòóôöõøùúûüųūÿýżźñçÄšžÀÃÂÄÃÅĄĆČĖĘÈÉÊËÌÃÃŽÃÄ®ÅŃÃ'Ã"Ã"ÖÕØÙÚÛÜŲŪŸÃŻŹÃ'ßÇÅ'ÆČŠŽ∂ð ,.'-]+)$/ 

As you can see, I missed most of the characters.

Is there a way to set the encoding for Travis when loading into the s3 bucket? Did I miss something?

+7
encoding amazon-s3 travis-ci
source share
1 answer

You have encoding problems. When this happens, you should check to see if there is any encoding information between the start and end point for your file.

You only have Travis → AWS, so its pretty easy. Try setting content-encoding to true

0
source share

All Articles