#!/bin/sh

set -x

tag_name=$1

if [ -z "$tag_name" ]; then
  echo "Error: Please provide tag_name"
  exit 1
fi

echo "tag_name is "${tag_name}


if [[ $tag_name != "sdk/auditlog/"* ]]; then
    echo "This is not sdk/auditlog tag, exit 0"
  	exit 0
fi



script_dir=$(dirname "$0")

file1=$script_dir/Template_audit_log_const_file
file2=$script_dir/../sdk/auditlog/consts.go

cmp -n $(wc -c < "$file1") "$file1" "$file2"


if [ $? -eq 0 ]; then
	echo "Check Audit sdk File successfully!"
	exit 0
else
	echo "Check Audit sdk File failed."
	exit 1
fi


