<commit_before>#!/bin/bash
#############################################################
#
# NOTE: MUST be run from kubernetes root directory.
#
# Cross-compile kubectl into the necessary os/arch
# permutations. Creates an archive, and uploads these
# os/arch archives to Google Cloud Storage at the
# following location: gs://kubectl-dispatcher
#
#############################################################

set -e
set -x

VERSION="1.11.7"
DATE_TIME=$(date +%Y-%m-%d-%T)
SECONDS_EPOCH=$(date +'%s')

OSES=("linux" "darwin" "windows")
ARCHES=("amd64" "386")

WINDOWS_SUFFIX=".exe"

BASE_SOURCE_DIR="_output/dockerized/bin"
DEST_BUCKET="gs://kubectl-dispatcher"
DEST_DIR=${DEST_BUCKET}/v${VERSION}/${SECONDS_EPOCH}
DEST_RELEASE=${DEST_BUCKET}/v${VERSION}/release

echo "Building kubectl dispatcher for version: $VERSION"
echo "Date/Time: $DATE_TIME"
echo

# Clean up first
echo "Cleaning up: make clean"
echo
build/run.sh make clean
echo "Cleaning up: make test-cmd"
echo
build/run.sh make test-cmd
echo
echo

for OS in ${OSES[*]}
do
  for ARCH in ${ARCHES[*]}
  do
    echo "Building kubectl dispatcher: ${OS}/${ARCH}"
    echo
    build/run.sh make kubectl KUBE_BUILD_PLATFORMS=${OS}/${ARCH}<commit_msg>Add git tag to cross compile build<commit_after>#!/bin/bash
#############################################################
#
# NOTE: MUST be run from kubernetes root directory.
#
# Cross-compile kubectl into the necessary os/arch
# permutations. Creates an archive, and uploads these
# os/arch archives to Google Cloud Storage at the
# following location: gs://kubectl-dispatcher
#
#############################################################

set -e
set -x

VERSION="1.11.7"
DISPATCHER_VERSION="1.0"
DATE_TIME=$(date +%Y-%m-%d-%T)
SECONDS_EPOCH=$(date +'%s')

OSES=("linux" "darwin" "windows")
ARCHES=("amd64" "386")

WINDOWS_SUFFIX=".exe"

BASE_SOURCE_DIR="_output/dockerized/bin"
DEST_BUCKET="gs://kubectl-dispatcher"
DEST_DIR=${DEST_BUCKET}/v${VERSION}/${SECONDS_EPOCH}
DEST_RELEASE=${DEST_BUCKET}/v${VERSION}/release

echo "Building kubectl dispatcher for version: $VERSION"
echo "Date/Time: $DATE_TIME"
echo

# Tag the build
echo "Tag the kubectl dispatcher build"
git tag -a v${VERSION}-dispatcher -m "kubectl dispatcher v${DISPATCHER_VERSION} at fork of v${VERSION}"
echo
echo

# Clean up first
echo "Cleaning up: make clean"
echo
build/run.sh make clean
echo "Cleaning up: make test-cmd"
echo
build/run.sh make test-cmd
echo
echo

# For each os/arch combination, we build the kubectl binary, then
# package it and upload to our GCS bucket.
for OS in ${OSES[*]}
do
  for ARCH in ${ARCHES[*]}
  do
    echo "Building kubectl dispatcher: ${OS}/${ARCH}"
    echo
    build/run.sh make kubectl KUBE_BUILD_PLATFORMS=${OS}/${ARCH}
{'fraction_non_alphanumeric': 0.21658144631117604, 'fraction_numerical': 0.007304601899196494, 'mean_word_length': 5.6, 'pattern_counts': {'":': 0, '<': 3, '<?xml version=': 0, '>': 3, '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': '1966269', 'n_tokens_mistral': 999, 'n_tokens_neox': 947, 'n_words': 259}