mirror of
https://github.com/awslabs/aws-crt-php.git
synced 2026-08-17 17:47:12 +00:00
mark release as stable and updates php requirement (#94)
This commit is contained in:
@@ -2,7 +2,7 @@
|
||||
<dependencies>
|
||||
<required>
|
||||
<php>
|
||||
<min>7.4.0</min>
|
||||
<min>5.5.0</min>
|
||||
</php>
|
||||
<pearinstaller>
|
||||
<min>1.10.0</min>
|
||||
|
||||
@@ -16,7 +16,7 @@
|
||||
<api>1.0.0</api>
|
||||
</version>
|
||||
<stability>
|
||||
<release>devel</release>
|
||||
<release>stable</release>
|
||||
<api>stable</api>
|
||||
</stability>
|
||||
<license uri="https://www.apache.org/licenses/LICENSE-2.0">Apache License Version 2.0</license>
|
||||
|
||||
@@ -47,14 +47,20 @@ os.chdir(WORK_DIR)
|
||||
|
||||
run(['git', 'submodule', 'update', '--init', '--recursive'])
|
||||
|
||||
# replace the version number in the ext/crt.c file
|
||||
# replace the version number in the file_with_version
|
||||
data = ""
|
||||
with open("ext/crt.c", "r") as c_file:
|
||||
file_with_version = "ext/php_aws_crt.h"
|
||||
with open(file_with_version, "r") as c_file:
|
||||
for line in c_file:
|
||||
line = re.sub("#define CRT_VERSION .*",
|
||||
f"#define CRT_VERSION \"{VERSION}\"", line)
|
||||
if "define PHP_AWSCRT_VERSION" in line:
|
||||
line = re.sub("define PHP_AWSCRT_VERSION .*",
|
||||
f"define PHP_AWSCRT_VERSION \"{VERSION}\"", line)
|
||||
if VERSION not in line:
|
||||
sys.exit(
|
||||
f"check {file_with_version}, the version number was not updated correctly.")
|
||||
data += line
|
||||
with open("ext/crt.c", "w") as c_file:
|
||||
|
||||
with open(file_with_version, "w") as c_file:
|
||||
c_file.write(data)
|
||||
|
||||
|
||||
|
||||
Reference in New Issue
Block a user