From 0f70173857adbf5919cc9a7a9d64a6a85abab306 Mon Sep 17 00:00:00 2001 From: stsdc <6031763+stsdc@users.noreply.github.com> Date: Sun, 5 Oct 2025 20:52:11 +0200 Subject: [PATCH] Update project version to 8.0.0 and remove post-install script --- meson.build | 8 +++--- meson/bump_version.py | 57 ------------------------------------------- meson/post_install.py | 14 ----------- 3 files changed, 5 insertions(+), 74 deletions(-) delete mode 100755 meson/bump_version.py delete mode 100755 meson/post_install.py diff --git a/meson.build b/meson.build index 0384c7bb..61d79c27 100644 --- a/meson.build +++ b/meson.build @@ -1,4 +1,4 @@ -project('io.elementary.monitor', 'vala', 'c', version: '0.17.2') +project('io.elementary.monitor', 'vala', 'c', version: '8.0.0') # these are Meson modules gnome = import('gnome') @@ -70,8 +70,10 @@ project_config = vcs_tag( subdir('src') -# Add in a post install script -meson.add_install_script('meson/post_install.py') +gnome.post_install( + glib_compile_schemas: true, + update_desktop_database: true +) subdir('po') # subdir('tests') diff --git a/meson/bump_version.py b/meson/bump_version.py deleted file mode 100755 index 356173e2..00000000 --- a/meson/bump_version.py +++ /dev/null @@ -1,57 +0,0 @@ -#!/usr/bin/env python3 - -''' -Bump all the versionsss!!! -''' - -import sys -import datetime - -print ('Bumping everything to: ' + sys.argv[1]) - -def bump_spec(): - SPEC_FILENAME = "../io.elementary.monitor.spec" - spec_content = '' - with open(SPEC_FILENAME, 'r') as f_spec: - print('Reading spec file: ' + SPEC_FILENAME) - for line in f_spec.readlines(): - if 'Version:' in line: - line = 'Version: ' + sys.argv[1] + '\n' - spec_content += line - - with open(SPEC_FILENAME, 'w') as f_spec: - print('Writing spec file: ' + SPEC_FILENAME) - f_spec.write(spec_content) - -def bump_meson(): - MESON_FILENAME = "../meson.build" - meson_content = '' - with open(MESON_FILENAME, 'r') as f_meson: - print('Reading meson file: ' + MESON_FILENAME) - for line in f_meson.readlines(): - if 'version: ' in line and 'project' in line: - # line = 'version: "' + sys.argv[1] + '"\n' - splitted = line.split('version: ') - line = splitted[0] + "version: '" + sys.argv[1] + "')\n" - - meson_content += line - - with open(MESON_FILENAME, 'w') as f_meson: - print('Writing meson file: ' + MESON_FILENAME) - f_meson.write(meson_content) - -def bump_deb_changelog(): - DEB_CHANGELOG_FILENAME = "../debian/changelog" - now = datetime.datetime.now() - deb_changelog_content = f"""io.elementary.monitor ({sys.argv[1]}) jammy; urgency=low\n - * \n -- Stanisław Dac {now.strftime("%a, %d %b %Y %H:%M:%S %z")} +0000\n\n""" - - with open(DEB_CHANGELOG_FILENAME, 'r+') as f_deb_changelog: - content = f_deb_changelog.read() - f_deb_changelog.seek(0) - print('Writing deb changelog file: ' + DEB_CHANGELOG_FILENAME) - f_deb_changelog.write(deb_changelog_content + content) - -bump_spec() -bump_meson() -bump_deb_changelog() \ No newline at end of file diff --git a/meson/post_install.py b/meson/post_install.py deleted file mode 100755 index 6c20222f..00000000 --- a/meson/post_install.py +++ /dev/null @@ -1,14 +0,0 @@ -#!/usr/bin/env python3 - -import os -import subprocess - -schema_dir = os.path.join(os.environ['MESON_INSTALL_PREFIX'], 'share', 'glib-2.0', 'schemas') -icon_cache_dir = os.path.join(os.environ['MESON_INSTALL_PREFIX'], 'share', 'icons', 'hicolor') - -if not os.environ.get('DESTDIR'): - print('Compiling gsettings schemas…') - subprocess.call(['glib-compile-schemas', schema_dir]) - - print('Updating desktop icon cache…') - subprocess.call(['gtk-update-icon-cache', '-qtf', icon_cache_dir])