<commit_before>#!/bin/sh

# Check that all files that should have the current version agree on it

AC_PATH=configure.ac
AC_VERS=$(sed '/AC_INIT/!d; s/AC_INIT(dsme, \(.*\))/\1/' $AC_PATH)

RPM_PATH=${RPM_SOURCE_DIR:-rpm}/${RPM_PACKAGE_NAME:-dsme}.spec
RPM_VERS=$(grep '^Version:' $RPM_PATH |sed -e 's/^.*:[[:space:]]*//')

YAML_PATH=rpm/dsme.yaml
YAML_VERS=$(grep '^Version:' $YAML_PATH |sed -e 's/^.*:[[:space:]]*//')

RES=0

if [ "$RPM_VERS" != "$AC_VERS" ]; then
  echo >&2 "$AC_PATH $AC_VERS vs $RPM_PATH $RPM_VERS"
  RES=1
fi

if [ "$RPM_VERS" != "$YAML_VERS" ]; then
  echo >&2 "$YAML_PATH $YAML_VERS vs $RPM_PATH $RPM_VERS"
  RES=1
fi

if [ $RES != 0 ]; then
  echo >&2 "Conflicting package versions"
fi
<commit_msg>[verify_version] Skip yaml check during OBS build<commit_after>#!/bin/sh

# Check that all files that should have the current version agree on it

AC_PATH=configure.ac
AC_VERS=$(sed '/AC_INIT/!d; s/AC_INIT(dsme, \(.*\))/\1/' $AC_PATH)

RPM_PATH=${RPM_SOURCE_DIR:-rpm}/${RPM_PACKAGE_NAME:-dsme}.spec
RPM_VERS=$(grep '^Version:' $RPM_PATH |sed -e 's/^.*:[[:space:]]*//')

YAML_PATH=rpm/dsme.yaml

RES=0

if [ "$RPM_VERS" != "$AC_VERS" ]; then
  echo >&2 "$AC_PATH $AC_VERS vs $RPM_PATH $RPM_VERS"
  RES=1
fi

# The yaml file is included in the git tree, but not in the tarball
# that is used during the OBS package build ...
if [ -f $YAML_PATH ]; then
  YAML_VERS=$(grep '^Version:' $YAML_PATH |sed -e 's/^.*:[[:space:]]*//')
  if [ "$RPM_VERS" != "$YAML_VERS" ]; then
    echo >&2 "$YAML_PATH $YAML_VERS vs $RPM_PATH $RPM_VERS"
    RES=1
  fi
fi

if [ $RES != 0 ]; then
  echo >&2 "Conflicting package versions"
fi

{'fraction_non_alphanumeric': 0.19743276283618583, 'fraction_numerical': 0.009779951100244499, 'mean_word_length': 4.3322475570032575, 'pattern_counts': {'":': 0, '<': 3, '<?xml version=': 0, '>': 9, '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': '4252661', 'n_tokens_mistral': 746, 'n_tokens_neox': 699, 'n_words': 175}