[meld/build-updates: 20/26] Add sanity check that the maint script is run from the project root




commit 2b8acf881d6b91a4aa14844b728340f4dccb2df1
Author: Kai Willadsen <kai willadsen gmail com>
Date:   Sun Sep 11 10:05:46 2022 +1000

    Add sanity check that the maint script is run from the project root

 maint | 6 +++---
 1 file changed, 3 insertions(+), 3 deletions(-)
---
diff --git a/maint b/maint
index f5a17ab3..0037aea7 100755
--- a/maint
+++ b/maint
@@ -306,7 +306,9 @@ def gitlab_release_tag(tag):
 
 @click.group()
 def cli():
-    pass
+    if not Path("meld.doap").exists():
+        click.echo("Can only be run from the top folder of the project")
+        raise click.Abort()
 
 
 @cli.command()
@@ -476,6 +478,4 @@ def make_release(ctx):
 
 
 if __name__ == '__main__':
-    # FIXME: Should include sanity check that we're at the top level of the
-    # project
     cli()


[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]