<commit_before>echo "# Build server";
cd server;
npm run build;
echo "The server has already been built so we no longer need the devDependencies (reduces the final bundle size)";
npm prune --production;
cd ..;

echo "# Build app";
npm run build

echo "# Build Docker image";
export REPO=martijnhols/wowanalyzer;
export TAG="build-$TRAVIS_BUILD_NUMBER";
#export BRANCH=$(
#	if [ "$TRAVIS_BRANCH" == "master" ]; then
#		echo "latest";
#	else
#		echo $TRAVIS_BRANCH;
#	fi | sed -r 's/\//-/g'
#);
docker build --tag $REPO:$TAG --file Dockerfile.package .;
echo "# Push Docker image";
docker login --username="$DOCKER_USERNAME" --password="$<PASSWORD>";
docker push $REPO:$TAG;<commit_msg>Update .travis/build.sh: don't generate a sourcemap for pull requests for speed<commit_after>echo "# Build server";
cd server;
npm run build;
echo "The server has already been built so we no longer need the devDependencies (reduces the final bundle size)";
npm prune --production;
cd ..;

if [ "$TRAVIS_PULL_REQUEST" ~= "false" ]; then
	# Save some time
	export GENERATE_SOURCEMAP=false;
fi

echo "# Build app";
npm run build

if [ "$TRAVIS_PULL_REQUEST" == "false" ]; then
	# Create a Docker image for this specific build. This allows us to go back to a particular build at any time, and makes it possible to deploy without rebuilding by just re-tagging the image.

	echo "# Build Docker image";
	export REPO=martijnhols/wowanalyzer;
	export TAG="build-$TRAVIS_BUILD_NUMBER";
	docker build --tag $REPO:$TAG --file Dockerfile.package .;
	echo "# Push Docker image";
	docker login --username="$DOCKER_USERNAME" --password="$<PASSWORD>";
	docker push $REPO:$TAG;
fi
{'fraction_non_alphanumeric': 0.12750455373406194, 'fraction_numerical': 0.0, 'mean_word_length': 4.682758620689655, 'pattern_counts': {'":': 0, '<': 5, '<?xml version=': 0, '>': 5, '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': '2682251', 'n_tokens_mistral': 557, 'n_tokens_neox': 529, 'n_words': 197}