<commit_before>#!/bin/bash

. ./scripts/env.sh
. ./build/tfs/common/common.sh

step "Build snap package" \
	npm run gulp -- "vscode-linux-$ARCH-build-snap"

# Variables
PLATFORM_SNAP="linux-snap-$ARCH"
REPO="`pwd`"
ROOT="$REPO/.."
BUILDNAME="VSCode-$PLATFORM_LINUX"
BUILD="$ROOT/$BUILDNAME"
PACKAGEJSON="$BUILD/resources/app/package.json"
VERSION=$(node -p "require(\"$PACKAGEJSON\").version")

SNAP_FILENAME="$(ls $REPO/.build/linux/snap/$ARCH/ | grep .snap)"
SNAP_PATH="$REPO/.build/linux/snap/$ARCH/$SNAP_FILENAME"

step "Publish Snap package" \
	node build/tfs/common/publish.js $VSCODE_QUALITY $PLATFORM_SNAP package $SNAP_FILENAME $VERSION true $SNAP_PATH

if [ -z "$VSCODE_QUALITY" ]; then
	echo "VSCODE_QUALITY is not set, skipping repo package publish"
else
	if [ -z "$SNAPCRAFT_LOGIN" ] || [ -z "$SNAPCRAFT_MACAROON" ] || [ -z "$SNAPCRAFT_UNBOUND_DISCHARGE" ]; then
		echo "SNAPCRAFT* env vars not set, skipping repo package publish"
	else
		LOGIN_FILE=snapcraft_login_file
		echo -e '[login.ubuntu.com]\nmacaroon = '$SNAPCRAFT_MACAROON'\nunbound_discharge = '$SNAPCRAFT_UNBOUND_DISCHARGE'\nemail = '$VSCODE_SNAP_LOGIN'\n' > $LOGIN_FILE
		snapcraft login --with $LOGIN_FILE

		AUTO_RELEASE=0
		if [ "$IS_FROZEN" != "true" ]; then
			if [ "$BUILD_SOURCEBRANCH" = "master" ] || [ "$BUILD_SOURCEBRANCH" = "refs/heads/master" ]; then
				if [[ $BUILD_QUEUEDBY = *"Project Collection Service Accounts"* || $BUILD_QUEUEDBY = *"Microsoft.VisualStudio.Services.TFS"* ]]; then
					if [ "$VSCODE_QUALITY" = "insiders" ]; then
						AUTO_RELEASE=1
					fi<commit_msg>Fix quality condition<commit_after>#!/bin/bash

. ./scripts/env.sh
. ./build/tfs/common/common.sh

step "Build snap package" \
	npm run gulp -- "vscode-linux-$ARCH-build-snap"

# Variables
PLATFORM_SNAP="linux-snap-$ARCH"
REPO="`pwd`"
ROOT="$REPO/.."
BUILDNAME="VSCode-$PLATFORM_LINUX"
BUILD="$ROOT/$BUILDNAME"
PACKAGEJSON="$BUILD/resources/app/package.json"
VERSION=$(node -p "require(\"$PACKAGEJSON\").version")

SNAP_FILENAME="$(ls $REPO/.build/linux/snap/$ARCH/ | grep .snap)"
SNAP_PATH="$REPO/.build/linux/snap/$ARCH/$SNAP_FILENAME"

step "Publish Snap package" \
	node build/tfs/common/publish.js $VSCODE_QUALITY $PLATFORM_SNAP package $SNAP_FILENAME $VERSION true $SNAP_PATH

if [ -z "$VSCODE_QUALITY" ]; then
	echo "VSCODE_QUALITY is not set, skipping repo package publish"
else
	if [ -z "$SNAPCRAFT_LOGIN" ] || [ -z "$SNAPCRAFT_MACAROON" ] || [ -z "$SNAPCRAFT_UNBOUND_DISCHARGE" ]; then
		echo "SNAPCRAFT* env vars not set, skipping repo package publish"
	else
		LOGIN_FILE=snapcraft_login_file
		echo -e '[login.ubuntu.com]\nmacaroon = '$SNAPCRAFT_MACAROON'\nunbound_discharge = '$SNAPCRAFT_UNBOUND_DISCHARGE'\nemail = '$VSCODE_SNAP_LOGIN'\n' > $LOGIN_FILE
		snapcraft login --with $LOGIN_FILE

		AUTO_RELEASE=0
		if [ "$IS_FROZEN" != "true" ]; then
			if [ "$BUILD_SOURCEBRANCH" = "master" ] || [ "$BUILD_SOURCEBRANCH" = "refs/heads/master" ]; then
				if [[ $BUILD_QUEUEDBY = *"Project Collection Service Accounts"* || $BUILD_QUEUEDBY = *"Microsoft.VisualStudio.Services.TFS"* ]]; then
					if [ "$VSCODE_QUALITY" = "insider" ]; then
						AUTO_RELEASE=1
					fi
{'fraction_non_alphanumeric': 0.16173193250557147, 'fraction_numerical': 0.0012734797835084368, 'mean_word_length': 4.851024208566108, 'pattern_counts': {'":': 0, '<': 3, '<?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': '3843838', 'n_tokens_mistral': 1293, 'n_tokens_neox': 1230, 'n_words': 221}