<commit_before>#!/bin/bash
# Copyright 2017 Yahoo Holdings. Licensed under the terms of the Apache 2.0 license. See LICENSE in the project root.
set -e

if [ $# -ne 1 ]; then
  echo "Usage: $0 <version>"
  exit 1
fi

readonly VERSION=$1
readonly SPECFILE="dist/vespa.spec"
readonly RPM_BRANCH="rpmbuild"
readonly CURRENT_BRANCH=$(git branch | grep "^\*" | cut -d' ' -f2)

# Make sure we are up to date
git checkout master
git pull --rebase

# Delete existing branch if exists and create new one
git push origin :$RPM_BRANCH &> /dev/null || true
git branch -D $RPM_BRANCH &> /dev/null || true 
git checkout -b $RPM_BRANCH $VERSION

# Tito expects spec file to be on root
git mv $SPECFILE .

# Hide pom.xml to avoid tito doing anything to our pom.xml files
mv pom.xml pom.xml.hide

# Run tito to update spec file and tag
tito init
tito tag --use-version=$VERSION --no-auto-changelog

# Push changes and tag to branc
git push -u origin --follow-tags $RPM_BRANCH

# Trig the build on Copr
curl -X POST \<commit_msg>Use git ref, which must be supplied<commit_after>#!/bin/bash
# Copyright 2017 Yahoo Holdings. Licensed under the terms of the Apache 2.0 license. See LICENSE in the project root.
set -e

if [ $# -ne 2 ]; then
  echo "Usage: $0 <version> <git ref>"
  exit 1
fi

readonly VERSION=$1
readonly GITREF=$2
readonly SPECFILE="dist/vespa.spec"
readonly RPM_BRANCH="rpmbuild"
readonly CURRENT_BRANCH=$(git branch | grep "^\*" | cut -d' ' -f2)

# Make sure we are up to date
git checkout master
git pull --rebase

# Delete existing branch if exists and create new one
git push --delete origin &> /dev/null || true
git branch -D $RPM_BRANCH &> /dev/null || true 
git checkout -b $RPM_BRANCH $GITREF

# Tito expects spec file to be on root
git mv $SPECFILE .

# Hide pom.xml to avoid tito doing anything to our pom.xml files
mv pom.xml pom.xml.hide

# Run tito to update spec file and tag
tito init
tito tag --use-version=$VERSION --no-auto-changelog

# Push changes and tag to branc
git push -u origin --follow-tags $RPM_BRANCH

# Trig the build on Copr
curl -X POST \
{'fraction_non_alphanumeric': 0.10009671179883946, 'fraction_numerical': 0.011121856866537718, 'mean_word_length': 3.6080178173719375, 'pattern_counts': {'":': 0, '<': 6, '<?xml version=': 0, '>': 10, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 8}, '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': '87052', 'n_tokens_mistral': 750, 'n_tokens_neox': 699, 'n_words': 298}