mirror of
https://github.com/ynput/ayon-core.git
synced 2025-12-24 21:04:40 +01:00
Remove pushing OPENPYPE_VERSION
That env var doesn't make sense in Ayon.
This commit is contained in:
parent
4d6a5d8bba
commit
c1e528e134
1 changed files with 1 additions and 24 deletions
|
|
@ -216,7 +216,7 @@ class CreatePublishRoyalRenderJob(pyblish.api.InstancePlugin,
|
|||
SeqEnd=1,
|
||||
SeqStep=1,
|
||||
SeqFileOffset=0,
|
||||
Version=self._sanitize_version(os.environ.get("OPENPYPE_VERSION")),
|
||||
Version=os.environ["AYON_BUNDLE_NAME"],
|
||||
SceneName=abs_metadata_path,
|
||||
# command line arguments
|
||||
CustomAddCmdFlags=" ".join(args),
|
||||
|
|
@ -243,26 +243,3 @@ class CreatePublishRoyalRenderJob(pyblish.api.InstancePlugin,
|
|||
job.WaitForPreIDs += jobs_pre_ids
|
||||
|
||||
return job
|
||||
|
||||
def _sanitize_version(self, version):
|
||||
"""Returns version in format MAJOR.MINORPATCH
|
||||
|
||||
3.15.7-nightly.2 >> 3.157
|
||||
"""
|
||||
VERSION_REGEX = re.compile(
|
||||
r"(?P<major>0|[1-9]\d*)"
|
||||
r"\.(?P<minor>0|[1-9]\d*)"
|
||||
r"\.(?P<patch>0|[1-9]\d*)"
|
||||
r"(?:-(?P<prerelease>[a-zA-Z\d\-.]*))?"
|
||||
r"(?:\+(?P<buildmetadata>[a-zA-Z\d\-.]*))?"
|
||||
)
|
||||
|
||||
valid_parts = VERSION_REGEX.findall(version)
|
||||
if len(valid_parts) != 1:
|
||||
# Return invalid version with filled 'origin' attribute
|
||||
return version
|
||||
|
||||
# Unpack found version
|
||||
major, minor, patch, pre, post = valid_parts[0]
|
||||
|
||||
return "{}.{}{}".format(major, minor, patch)
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue