#!/usr/bin/python3

# Copyright (c) 2023 SUSE Software Solutions
#
# This library is free software; you can redistribute it and/or
# modify it under the terms of the GNU Library General Public
# License as published by the Free Software Foundation; either
# version 2 of the License, or (at your option) any later version.
#
# This library  is distributed in the hope that it will be useful,
# but WITHOUT ANY WARRANTY; without even the implied warranty of
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
# GNU Library General Public License for more details.
#
# You should have received a copy of the GNU Library General Public
# License along with this library; see the file COPYING.LIB. If not,
# write to the Free Software Foundation, Inc., 59 Temple Place,
# Suite 330, Boston, MA  02111-1307, USA

import argparse
import release_compare  # pylint: disable=wrong-import-position; # noqa: E402
from release_compare.version import __version__  # pylint: disable=wrong-import-position; # noqa: E402

parser = argparse.ArgumentParser(
    prog='create_changelog',
    description='Generate change log data from image build'
)
parser.add_argument('--version', action='version', version=__version__)
parser.add_argument(
    '--root',
    default='/.build.packages',
    help="Root directory of packages build info [default: /.build.packages]"
)
args = parser.parse_args()
release_compare.main(args.root)
