diff --git a/bitbucket-pipelines.yml b/bitbucket-pipelines.yml index e262282..32f33bd 100644 --- a/bitbucket-pipelines.yml +++ b/bitbucket-pipelines.yml @@ -1,11 +1,10 @@ image: python:3.7.3 - +options: + max-time: 1 pipelines: custom: - check_version: + pull-requests: - step: - caches: - - pip script: - git submodule update --init - - python pipeline.py \ No newline at end of file + - python twincat_version_manager.py \ No newline at end of file diff --git a/pipeline.py b/twincat_version_manager.py similarity index 91% rename from pipeline.py rename to twincat_version_manager.py index 33fe5e1..58d9f07 100644 --- a/pipeline.py +++ b/twincat_version_manager.py @@ -1,6 +1,5 @@ import glob import xml.etree.ElementTree as ET -import os VERSION_TAGS = {"**/*.Tc*": "ProductVersion", "**/*.tsproj": "TcVersion"} CORRECT_VERSION = "3.1.4024.0" @@ -33,4 +32,4 @@ if __name__ == "__main__": incorrect_files = check_versions() for file, version in incorrect_files.items(): print("ERROR: {} has incorrect version {}, expected version {}".format(file, version, CORRECT_VERSION)) - exit(0) # Exit with non-zero if any bad versions were found + exit(len(incorrect_files)) # Exit with non-zero if any bad versions were found