<commit_before>
FROM golang:alpine as builder

## This dockerfile is for CI/CD.
## We use docker as a build method, but we are not shipping docker artifacts.
##
## If you wish to save the resulting output, map "output/" to 
## a local mount, or do a second stage build that copies "output/".
##


RUN apk add make git rsync curl openssh-client


COPY . /build
WORKDIR /build

RUN go install github.com/falling-sky/fsbuilder

# Make sure there is a valid sites file (minimum for beta).
# Under release and i18n conditions, do a full real check.
RUN cd sites && go run parse-sites.go --skip-validation
RUN ls -l cicd_release ; true 
RUN ls -l cicd_i18n  ; true
RUN if [[ -s cicd_release ||  -s cicd_i18n ]]; then cd sites && go run parse-sites.go || exit 1 ; fi
#RUN if [[ -s cicd_i18n ]]; then ./support/add-build-date ; fi
RUN cat ./templates/js/sites_parsed.js

# Build the project
RUN fsbuilder

# Post-processing: translation and uploads
RUN if [[ -s translations/crowdin.yaml ]]; then cd translations && make || exit 1 ; fi

# Publish
RUN if [ -s cicd_release ]; then  rsync -a -e "ssh -o StrictHostKeyChecking=no  -i cicd_release -p 2222"  output/. <EMAIL>:stable/content/. || exit 1 ; fi
RUN if [ -s cicd_i18n    ]; then  rsync -a -e "ssh -o StrictHostKeyChecking=no  -i cicd_i18n -p 2222"  output/. <EMAIL>:i18n/content/. || exit 1 ; fi




# We're not really wanting to publish anything.
FROM scratch
COPY --from=builder /bin/true /bin/true
<commit_msg>date i18n<commit_after>
FROM golang:alpine as builder

## This dockerfile is for CI/CD.
## We use docker as a build method, but we are not shipping docker artifacts.
##
## If you wish to save the resulting output, map "output/" to 
## a local mount, or do a second stage build that copies "output/".
##


RUN apk add make git rsync curl openssh-client


COPY . /build
WORKDIR /build

RUN go install github.com/falling-sky/fsbuilder

# Make sure there is a valid sites file (minimum for beta).
# Under release and i18n conditions, do a full real check.
RUN cd sites && go run parse-sites.go --skip-validation
RUN ls -l cicd_release ; true 
RUN ls -l cicd_i18n  ; true
RUN if [[ -s cicd_release ||  -s cicd_i18n ]]; then cd sites && go run parse-sites.go || exit 1 ; fi
RUN if [[ -s cicd_i18n ]]; then ./support/add-build-date ; fi
RUN cat ./templates/js/sites_parsed.js

# Build the project
RUN fsbuilder

# Post-processing: translation and uploads
RUN if [[ -s translations/crowdin.yaml ]]; then cd translations && make || exit 1 ; fi

# Publish
RUN if [ -s cicd_release ]; then  rsync -a -e "ssh -o StrictHostKeyChecking=no  -i cicd_release -p 2222"  output/. <EMAIL>:stable/content/. || exit 1 ; fi
RUN if [ -s cicd_i18n    ]; then  rsync -a -e "ssh -o StrictHostKeyChecking=no  -i cicd_i18n -p 2222"  output/. <EMAIL>:i18n/content/. || exit 1 ; fi




# We're not really wanting to publish anything.
FROM scratch
COPY --from=builder /bin/true /bin/true

{'fraction_non_alphanumeric': 0.11141583818992115, 'fraction_numerical': 0.018512170037709975, 'mean_word_length': 3.3293768545994067, 'pattern_counts': {'":': 0, '<': 7, '<?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': '1237364', 'n_tokens_mistral': 1078, 'n_tokens_neox': 990, 'n_words': 401}