Skip to content

Commit

Permalink
Version update
Browse files Browse the repository at this point in the history
  • Loading branch information
lemire committed Mar 18, 2024
1 parent c5357aa commit a0819ed
Show file tree
Hide file tree
Showing 6 changed files with 21 additions and 21 deletions.
6 changes: 3 additions & 3 deletions CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ cmake_minimum_required(VERSION 3.15)
project(simdutf
DESCRIPTION "Fast Unicode validation, transcoding and processing"
LANGUAGES CXX
VERSION 4.0.9
VERSION 5.0.0
)

include (TestBigEndian)
Expand All @@ -23,8 +23,8 @@ include(GNUInstallDirs)
include(CTest)
include(cmake/simdutf-flags.cmake)

set(SIMDUTF_LIB_VERSION "5.0.0" CACHE STRING "simdutf library version")
set(SIMDUTF_LIB_SOVERSION "5" CACHE STRING "simdutf library soversion")
set(SIMDUTF_LIB_VERSION "6.0.0" CACHE STRING "simdutf library version")
set(SIMDUTF_LIB_SOVERSION "6" CACHE STRING "simdutf library soversion")
option(SIMDUTF_TESTS "Whether the tests are included as part of the CMake Build." ON)
option(SIMDUTF_BENCHMARKS "Whether the benchmarks are included as part of the CMake Build." OFF)
option(SIMDUTF_TOOLS "Whether the tools are included as part of the CMake build." ON)
Expand Down
2 changes: 1 addition & 1 deletion Doxyfile
Original file line number Diff line number Diff line change
Expand Up @@ -38,7 +38,7 @@ PROJECT_NAME = simdutf
# could be handy for archiving the generated documentation or if some version
# control system is used.

PROJECT_NUMBER = "4.0.9"
PROJECT_NUMBER = "5.0.0"

# Using the PROJECT_BRIEF tag one can provide an optional one line description
# for a project that appears at the top of each page and should give viewer a
Expand Down
4 changes: 2 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -139,7 +139,7 @@ Linux or macOS users might follow the following instructions if they have a rece

1. Pull the library in a directory
```
wget https://github.com/simdutf/simdutf/releases/download/v4.0.9/singleheader.zip
wget https://github.com/simdutf/simdutf/releases/download/v5.0.0/singleheader.zip
unzip singleheader.zip
```
2. Compile
Expand Down Expand Up @@ -196,7 +196,7 @@ Single-header version
You can create a single-header version of the library where
all of the code is put into two files (`simdutf.h` and `simdutf.cpp`).
We publish a zip archive containing these files, e.g., see
https://github.com/simdutf/simdutf/releases/download/v4.0.9/singleheader.zip
https://github.com/simdutf/simdutf/releases/download/v5.0.0/singleheader.zip

You may generate it on your own using a Python script.

Expand Down
6 changes: 3 additions & 3 deletions include/simdutf/simdutf_version.h
Original file line number Diff line number Diff line change
Expand Up @@ -4,22 +4,22 @@
#define SIMDUTF_SIMDUTF_VERSION_H

/** The version of simdutf being used (major.minor.revision) */
#define SIMDUTF_VERSION "4.0.9"
#define SIMDUTF_VERSION "5.0.0"

namespace simdutf {
enum {
/**
* The major version (MAJOR.minor.revision) of simdutf being used.
*/
SIMDUTF_VERSION_MAJOR = 4,
SIMDUTF_VERSION_MAJOR = 5,
/**
* The minor version (major.MINOR.revision) of simdutf being used.
*/
SIMDUTF_VERSION_MINOR = 0,
/**
* The revision (major.minor.REVISION) of simdutf being used.
*/
SIMDUTF_VERSION_REVISION = 9
SIMDUTF_VERSION_REVISION = 0
};
} // namespace simdutf

Expand Down
18 changes: 9 additions & 9 deletions scripts/release.py
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ def colored(r, g, b, text):
return "\033[38;2;{};{};{}m{} \033[38;2;255;255;255m".format(r, g, b, text)

def extractnumbers(s):
return tuple(map(int,re.findall("(\d+)\.(\d+)\.(\d+)",str(s))[0]))
return tuple(map(int,re.findall(r"(\d+)\.(\d+)\.(\d+)",str(s))[0]))

def toversionstring(major, minor, rev):
return str(major)+"."+str(minor)+"."+str(rev)
Expand Down Expand Up @@ -120,7 +120,7 @@ def topaddedversionstring(major, minor, rev):
newversionstring = str(newversion[0]) + "." + str(newversion[1]) + "." + str(newversion[2])
cmakefile = maindir + os.sep + "CMakeLists.txt"
sonumber = None
pattern = re.compile("set\(SIMDUTF_LIB_SOVERSION \"(\d+)\" CACHE STRING \"simdutf library soversion\"\)")
pattern = re.compile(r"""set\(SIMDUTF_LIB_SOVERSION "(\d+)" CACHE STRING "simdutf library soversion"\)""")
with open (cmakefile, 'rt') as myfile:
for line in myfile:
m = pattern.search(line)
Expand All @@ -134,17 +134,17 @@ def topaddedversionstring(major, minor, rev):
sonumber += 1

for line in fileinput.input(cmakefile, inplace=1, backup='.bak'):
line = re.sub(' VERSION \d+\.\d+\.\d+',' VERSION '+newmajorversionstring+'.'+mewminorversionstring+'.'+newrevversionstring, line.rstrip())
line = re.sub('SIMDUTF_LIB_VERSION "\d+\.\d+\.\d+','SIMDUTF_LIB_VERSION "'+str(sonumber)+".0.0", line)
line = re.sub('set\(SIMDUTF_LIB_SOVERSION \"\d+\"','set(SIMDUTF_LIB_SOVERSION \"'+str(sonumber)+'\"', line)
line = re.sub(r' VERSION \d+\.\d+\.\d+',' VERSION '+newmajorversionstring+'.'+mewminorversionstring+'.'+newrevversionstring, line.rstrip())
line = re.sub(r'SIMDUTF_LIB_VERSION "\d+\.\d+\.\d+','SIMDUTF_LIB_VERSION "'+str(sonumber)+".0.0", line)
line = re.sub(r'set\(SIMDUTF_LIB_SOVERSION "\d+"','set(SIMDUTF_LIB_SOVERSION \"'+str(sonumber)+'\"', line)
print(line)

print("modified "+cmakefile+", a backup was made")


doxyfile = maindir + os.sep + "Doxyfile"
for line in fileinput.input(doxyfile, inplace=1, backup='.bak'):
line = re.sub('PROJECT_NUMBER = "\d+\.\d+\.\d+','PROJECT_NUMBER = "'+newversionstring, line.rstrip())
line = re.sub(r'PROJECT_NUMBER = "\d+\.\d+\.\d+','PROJECT_NUMBER = "'+newversionstring, line.rstrip())
print(line)
print("modified "+doxyfile+", a backup was made")

Expand All @@ -166,13 +166,13 @@ def topaddedversionstring(major, minor, rev):


for line in fileinput.input(readmefile, inplace=1, backup='.bak'):
line = re.sub(' wget https://github.com/simdutf/simdutf/releases/download/v\d+\.\d+\.\d+/singleheader.zip',' wget https://github.com/simdutf/simdutf/releases/download/v'+newmajorversionstring+'.'+mewminorversionstring+'.'+newrevversionstring+'/singleheader.zip', line.rstrip())
line = re.sub('https://github.com/simdutf/simdutf/releases/download/v\d+\.\d+\.\d+/singleheader.zip','https://github.com/simdutf/simdutf/releases/download/v'+newmajorversionstring+'.'+mewminorversionstring+'.'+newrevversionstring+'/singleheader.zip', line.rstrip())
line = re.sub(r' wget https://github.com/simdutf/simdutf/releases/download/v\d+\.\d+\.\d+/singleheader.zip',' wget https://github.com/simdutf/simdutf/releases/download/v'+newmajorversionstring+'.'+mewminorversionstring+'.'+newrevversionstring+'/singleheader.zip', line.rstrip())
line = re.sub(r'https://github.com/simdutf/simdutf/releases/download/v\d+\.\d+\.\d+/singleheader.zip','https://github.com/simdutf/simdutf/releases/download/v'+newmajorversionstring+'.'+mewminorversionstring+'.'+newrevversionstring+'/singleheader.zip', line.rstrip())
print(line)

print("modified "+readmefile+", a backup was made")

pattern = re.compile("https://simdutf.org/api/(\d+\.\d+\.\d+)/index.html")
pattern = re.compile(r"https://simdutf.org/api/(\d+\.\d+\.\d+)/index.html")
readmedata = open(readmefile).read()
m = pattern.search(readmedata)
if m == None:
Expand Down
6 changes: 3 additions & 3 deletions singleheader/amalgamate.py
Original file line number Diff line number Diff line change
Expand Up @@ -88,9 +88,9 @@ def dofile(fid, prepath, filename):
RELFILE = os.path.relpath(file, PROJECTPATH)
# Last lines are always ignored. Files should end by an empty lines.
print(f"/* begin file {RELFILE} */", file=fid)
includepattern = re.compile('\s*#\s*include "(.*)"')
redefines_simdutf_implementation = re.compile('^#define\s+SIMDUTF_IMPLEMENTATION\s+(.*)')
undefines_simdutf_implementation = re.compile('^#undef\s+SIMDUTF_IMPLEMENTATION\s*$')
includepattern = re.compile(r'\s*#\s*include "(.*)"')
redefines_simdutf_implementation = re.compile(r'^#define\s+SIMDUTF_IMPLEMENTATION\s+(.*)')
undefines_simdutf_implementation = re.compile(r'^#undef\s+SIMDUTF_IMPLEMENTATION\s*$')
uses_simdutf_implementation = re.compile('SIMDUTF_IMPLEMENTATION([^_a-zA-Z0-9]|$)')
with open(file, 'r') as fid2:
for line in fid2:
Expand Down

0 comments on commit a0819ed

Please sign in to comment.