cmake: remove version info from CMakeLists.txt

The version info is always obtained from hg repo history or from
.hg_archival.txt files generated during 'hg archive'.

As a result, new releases will not have "version X.Y" commits anymore, but
they will instead have tag & signature commits.

Signed-off-by: Josef 'Jeff' Sipek <jeffpc@josefsipek.net>
2 files changed, 5 insertions(+), 18 deletions(-)

M CMakeLists.txt
M tag-and-sign.sh
M CMakeLists.txt +0 -3
@@ 23,8 23,6 @@ 
 cmake_minimum_required(VERSION 3.12)
 project(libjeffpc)
 
-set(JEFFPC_VERSION 0.22-rc1)
-
 enable_testing()
 
 add_definitions(

          
@@ 215,7 213,6 @@ add_custom_command(TARGET revisiontag
 		-DHG_ARCHIVAL=${CMAKE_SOURCE_DIR}/.hg_archival.txt
 		-DSOURCE_DIR=${CMAKE_CURRENT_SOURCE_DIR}
 		-DBINARY_DIR=${CMAKE_CURRENT_BINARY_DIR}
-		-DJEFFPC_VERSION=v${JEFFPC_VERSION}
 		-P ${CMAKE_CURRENT_SOURCE_DIR}/cmake/hg.cmake
 )
 

          
M tag-and-sign.sh +5 -15
@@ 1,6 1,6 @@ 
 #!/bin/sh
 #
-# Copyright (c) 2018 Josef 'Jeff' Sipek <jeffpc@josefsipek.net>
+# Copyright (c) 2018,2024 Josef 'Jeff' Sipek <jeffpc@josefsipek.net>
 #
 # Permission is hereby granted, free of charge, to any person obtaining a copy
 # of this software and associated documentation files (the "Software"), to deal

          
@@ 41,19 41,9 @@ echo "version = '$version'"
 echo "ok?"
 read n
 
-gsed -i -e "s/set(JEFFPC_VERSION.*)$/set(JEFFPC_VERSION $version)/" CMakeLists.txt
-(
-	echo "libjeffpc $version"
-	echo
-	echo "Signed-off-by: Josef 'Jeff' Sipek <jeffpc@josefsipek.net>"
-) | hg commit -l /dev/stdin
+set -x
 
-hg log -p --stat -r.
+hg tag -f -e $tag
+hg sign -e .
 
-echo "version changed."
-echo "ok?"
-read n
-
-hg tag $tag
-hg sign --no-commit $tag
-hg amend
+# TODO: generate tarball & sign it