Skip to content

Commit

Permalink
Show warnings in PHP
Browse files Browse the repository at this point in the history
  • Loading branch information
Denis-Averin committed Jul 26, 2023
1 parent ecf51eb commit 6fcf00d
Show file tree
Hide file tree
Showing 4 changed files with 13 additions and 9 deletions.
4 changes: 4 additions & 0 deletions codegen/config-php.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
{
"artifactVersion": "23.7.1",
"invokerPackage": "Aspose\\BarCode"
}
1 change: 0 additions & 1 deletion codegen/config.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,5 @@
{
"artifactVersion": "23.7.0",
"invokerPackage": "Aspose\\BarCode",
"npmName": "aspose-barcode-cloud-node",
"npmVersion": "23.7.0",
"packageName": "Aspose.BarCode.Cloud.Sdk",
Expand Down
9 changes: 5 additions & 4 deletions codegen/generate-php.bash
Original file line number Diff line number Diff line change
Expand Up @@ -10,9 +10,10 @@ then
rm -rf "${tempDir}"
fi

# java -DdebugModels -jar Tools/swagger-codegen-cli.jar generate -i "${specSource}" -l php -t Templates/php -o "${tempDir}" -c config.json > debugModels.php.json
# java -DdebugOperations -jar Tools/swagger-codegen-cli.jar generate -i "${specSource}" -l php -t Templates/php -o "${tempDir}" -c config.json > debugOperations.php.json
java -jar Tools/swagger-codegen-cli.jar generate -i "${specSource}" -l php -t Templates/php -o "${tempDir}" -c config.json
# java -jar Tools/swagger-codegen-cli.jar config-help -l php & exit 1
# java -DdebugModels -jar Tools/swagger-codegen-cli.jar generate -i "${specSource}" -l php -t Templates/php -o "${tempDir}" -c config-php.json > debugModels.php.json
# java -DdebugOperations -jar Tools/swagger-codegen-cli.jar generate -i "${specSource}" -l php -t Templates/php -o "${tempDir}" -c config-php.json > debugOperations.php.json
java -jar Tools/swagger-codegen-cli.jar generate -i "${specSource}" -l php -t Templates/php -o "${tempDir}" -c config-php.json

python Tools/split-php-file.py "${tempDir}/SwaggerClient-php/lib/Api/BarcodeApi.php" "${tempDir}/SwaggerClient-php/lib/Requests/"
python Tools/split-php-file.py "${tempDir}/SwaggerClient-php/lib/Api/FileApi.php" "${tempDir}/SwaggerClient-php/lib/Requests/"
Expand All @@ -39,4 +40,4 @@ cp ../scripts/check-badges.bash "$targetDir/scripts/"

rm -rf "${tempDir}"

pushd "${targetDir}" && make format && popd >/dev/null
pushd "${targetDir}" && make after-gen && popd >/dev/null
8 changes: 4 additions & 4 deletions scripts/new-version.py
Original file line number Diff line number Diff line change
Expand Up @@ -54,7 +54,7 @@ def set_node_version(new_version, filename=os.path.join(BASE_CONFIG_DIR, "config
save_config(config, filename)


def set_php_version(new_version, filename=os.path.join(BASE_CONFIG_DIR, "config.json")):
def set_php_version(new_version, filename=os.path.join(BASE_CONFIG_DIR, "config-php.json")):
config = read_config(filename)
config["artifactVersion"] = str.join(".", map(str, new_version))
save_config(config, filename)
Expand All @@ -79,8 +79,8 @@ def save_config(config, filename):


def main(new_versions):
assert len(new_versions) == 2
new_version = tuple(new_versions + [0])
assert 2 <= len(new_versions) <= 3, "Version format should be: 23 7 or 23 7 1"
new_version = tuple(new_versions + [0] * (3-len(new_versions)))

set_android_version(new_version)
set_dart_version(new_version)
Expand All @@ -94,7 +94,7 @@ def main(new_versions):

def parse_args():
parser = argparse.ArgumentParser(usage="%s %s" % (sys.argv[0], datetime.today().strftime("%y %m")))
parser.add_argument("new_versions", type=int, nargs=2, help="Use separate int values like: 21 6")
parser.add_argument("new_versions", type=int, nargs="+", help="Use separate int values like: 21 6 1")
args = parser.parse_args()
return vars(args)

Expand Down

0 comments on commit 6fcf00d

Please sign in to comment.