#!/bin/bash
# Check to ensure changelog is updated

git fetch
git diff --name-only HEAD origin/$CI_DEFAULT_BRANCH

CHANGED=$(git diff --name-only HEAD origin/$CI_DEFAULT_BRANCH | grep -ci debian/changelog)

if [[ $CHANGED -eq 0 ]]; then
  echo "Changelog must be bumped."
  exit 1
else
  exit 0
fi
