Skip to content

Commit

Permalink
Convert all plugin rezconfig to rezconfig.py
Browse files Browse the repository at this point in the history
Signed-off-by: brycegbrazen <[email protected]>
  • Loading branch information
brycegbrazen committed Mar 19, 2024
1 parent dc2c777 commit a04dc0f
Show file tree
Hide file tree
Showing 7 changed files with 98 additions and 116 deletions.
File renamed without changes.
21 changes: 0 additions & 21 deletions src/rezplugins/build_system/rezconfig

This file was deleted.

Original file line number Diff line number Diff line change
@@ -1,15 +1,9 @@
filesystem:
# The mechanism used to create the lockfile. If set to 'default', this will
# use hardlinks if the 'os.link' method is present, otherwise mkdir is used.
# It can also be explicitly set to use only 'hardlink', or only 'mkdir'.
# Valid options are 'default', 'mkdir', or 'hardlink'
file_lock_type: default

filesystem = {
# The timeout to use when creating file locks. This is done when a variant is
# installed into an existing package, to prevent multiple file writes at
# once (which could result in a variant install getting lost). The timeout
# value is in seconds. A value of zero indicates no timeout.
file_lock_timeout: 10
"file_lock_timeout": 10,

# The relative directory, under the repository location, where file locks
# are created. You might need to use this option when file permissions are
Expand All @@ -21,13 +15,13 @@
#
# Note: The directory can have any name, but we suggest '.lock' as the
# standard convention.
file_lock_dir:
"file_lock_dir": None,

# If True, verify that a potential package directory contains a package.py /
# package.yaml file before treating it as a package. There *shouldn't* be
# non-packages in these directories, and the solver is faster if this value
# is False, because a lot of file stats are avoided.
check_package_definition_files: false
"check_package_definition_files": False,

# A list of filenames that are expected to contain Rez definitions.
# The list will be checked in top to bottom order, and the first filename
Expand All @@ -39,5 +33,7 @@
# released package filename, regardless of the definition filename present
# in the source.
#
package_filenames:
- 'package'
"package_filenames": [
"package"
]
}
Original file line number Diff line number Diff line change
@@ -1,18 +1,22 @@
emailer:

emailer = {
# SMTP host.
smtp_host: ''
"smtp_host": '',

# SMTP port.
smtp_port: 25
"smtp_port": 25,

# The address that post-release emails appear to come from.
sender: '{system.user}@rez-release.com'
"sender": '{system.user}@rez-release.com',

# List of recipients of post-release emails; OR, path to recipients config
# file (see emailer-recipients-example.yaml). If this is a string that
# contains '@' and doesn't refer to a filepath, then it's treated as an
# email address.
recipients: []
"recipients": [],

# Subject format - supports the same object formatting available in 'body'
"subject": '[rez] [release] {system.user} released {package.qualified_name}',

# Message format. Available objects for formatting are:
# - package: The package that is being released.
Expand All @@ -25,43 +29,43 @@
# - variants: Namespace for info about the variants that were released:
# - count: The number of variants that were released;
# - paths: Newline-separated paths to the root of each variant.
body: |
Package '{package.qualified_name}' was released by {system.user}@{system.fqdn}.
"body": \
"""
Package '{package.qualified_name}' was released by {system.user}@{system.fqdn}.
USER: {system.user}
PACKAGE: {package.qualified_name}
RELEASED TO: {release.path}
PREVIOUS VERSION: {release.previous_version}
REZ VERSION: {system.rez_version}
USER: {system.user}
PACKAGE: {package.qualified_name}
RELEASED TO: {release.path}
PREVIOUS VERSION: {release.previous_version}
REZ VERSION: {system.rez_version}
{variants.count} VARIANTS:
{variants.paths}
{variants.count} VARIANTS:
{variants.paths}
MESSAGE:
{release.message}
MESSAGE:
{release.message}
CHANGELOG:
{release.changelog}

# Subject format - supports the same object formatting available in 'body'
subject: '[rez] [release] {system.user} released {package.qualified_name}'
CHANGELOG:
{release.changelog}
""".strip()
}

command:
command = {
# If true, print the commands that are being run
print_commands: true
"print_commands": True,

# If true, print output of commands.
print_output: true
"print_output": True,

# If true, print failed commands to stderr
print_error: true
"print_error": True,

# If true, cancel the package release if a pre-* command fails.
cancel_on_error: true
"cancel_on_error": True,

# If true, skip all commands after a failed command. This does not cancel
# the package release.
stop_on_error: true
"stop_on_error": True,

# List of commands to execute prior to build, in given order.
# Each item is a dict containing:
Expand All @@ -82,44 +86,45 @@
# - release: Namespace for info about the current release, contains:
# - path: Installation path of release.
#
# Also, any environment variables references in command arguments are
# expanded also.
# Any environment variables references in command arguments are expanded.
#
# Example:
# pre_build_commands
# - command: ls
# args: '-a -l'
# user: root
#
pre_build_commands: []
"pre_build_commands": [],

# Same expected values as pre_build_commands
pre_release_commands: []
"pre_release_commands": [],

# Same expected values as pre_build_commands
post_release_commands: []
"post_release_commands": []
}

amqp:
amqp = {
# host server, or '{host}:{port}'
host: ''
"host": '',

# userid
userid: ''
"userid": '',

# password
password: ''
"password": '',

# connection timeout
connect_timeout: 10
"connect_timeout": 10,

# exchange name
exchange_name: ''
"exchange_name": '',

# exchange routing key
exchange_routing_key: 'REZ.PACKAGE.RELEASED'
"exchange_routing_key": 'REZ.PACKAGE.RELEASED',

# message delivery mode
message_delivery_mode: 1
"message_delivery_mode": 1,

# extra message attributes to be published
message_attributes: {}
"message_attributes": {}
}
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
git:
git = {
# If false, cancel a package release if there is no upstream branch.
allow_no_upstream: false
"allow_no_upstream": False
}
40 changes: 0 additions & 40 deletions src/rezplugins/shell/rezconfig

This file was deleted.

41 changes: 41 additions & 0 deletions src/rezplugins/shell/rezconfig.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,41 @@
sh = {
"prompt": '>',
"executable_fullpath": None
}
bash = {
"prompt": '>',
"executable_fullpath": None
}
csh = {
"prompt": '>',
"executable_fullpath": None
}
tcsh = {
"prompt": '>',
"executable_fullpath": None
}
zsh = {
"prompt": '%',
"executable_fullpath": None
}
cmd = {
"prompt": '$G',
"additional_pathext": [".PY"],
"executable_fullpath": None
}
powershell = {
"prompt": '> $ ',
"additional_pathext": [".PY"],
"executable_fullpath": None,
"execution_policy": None
}
pwsh = {
"prompt": '> $ ',
"additional_pathext": [".PY"],
"executable_fullpath": None,
"execution_policy": None
}
gitbash = {
"prompt": '>',
"executable_fullpath": None
}

0 comments on commit a04dc0f

Please sign in to comment.