<commit_before>#!/bin/bash
set -e

npm run build-dev

. ./.env-dev

s3cmd del --recursive --force $S3_BUCKET_URL

gzip dist/index.html -9 -c > dist/index.html.gz
gzip dist/main.js -9 -c > dist/main.js.gz

s3cmd sync ./dist/index.html.gz \
           $S3_BUCKET_URL/index.html \
           --force \
           --delete-removed \
           --reduced-redundancy \
           --acl-public \
           -m text/html \
           --add-header='Cache-Control:max-age=3600' \
           --add-header='Content-Encoding:gzip'

s3cmd sync ./dist/main.js.gz \
           $S3_BUCKET_URL/main.js \
           --force \
           --delete-removed \
           --reduced-redundancy \
           --acl-public \
           -m text/js \
           --add-header='Cache-Control:max-age=3600' \
           --add-header='Content-Encoding:gzip'<commit_msg>[deploy] remove --force and del<commit_after>#!/bin/bash
set -e

npm run build-dev

. ./.env-dev

# s3cmd del --recursive --force $S3_BUCKET_URL

gzip dist/index.html -9 -c > dist/index.html.gz
gzip dist/main.js -9 -c > dist/main.js.gz

s3cmd sync ./dist/index.html.gz \
           $S3_BUCKET_URL/index.html \
           --delete-removed \
           --reduced-redundancy \
           --acl-public \
           -m text/html \
           --add-header='Cache-Control:max-age=3600' \
           --add-header='Content-Encoding:gzip'

s3cmd sync ./dist/main.js.gz \
           $S3_BUCKET_URL/main.js \
           --delete-removed \
           --reduced-redundancy \
           --acl-public \
           -m text/js \
           --add-header='Cache-Control:max-age=3600' \
           --add-header='Content-Encoding:gzip'
{'fraction_non_alphanumeric': 0.15594660194174756, 'fraction_numerical': 0.019417475728155338, 'mean_word_length': 1.4611940298507462, 'pattern_counts': {'":': 0, '<': 3, '<?xml version=': 0, '>': 7, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '5157944', 'n_tokens_mistral': 600, 'n_tokens_neox': 587, 'n_words': 93}