Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add --ignore-for-workflow parameter #508

Open
wants to merge 1 commit into
base: master
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 4 additions & 0 deletions TarSCM/cli.py
Original file line number Diff line number Diff line change
Expand Up @@ -195,6 +195,10 @@ def parse_args(self, options):
'(only used with \'--latest-signed-*\')')
parser.add_argument('--without-version', default = False,
help='Do not add version to output file.')
parser.add_argument('--ignore-for-workflow', default = False,
help='Do not override the sources when running OBS'
'SCM branch_package workflow. Useful for'
'auxiliary files such as recipes.')

self.verify_args(parser.parse_args(options))

Expand Down
2 changes: 1 addition & 1 deletion TarSCM/tasks.py
Original file line number Diff line number Diff line change
Expand Up @@ -160,7 +160,7 @@ def check_for_branch_request(self):
# the source supposed to be merged is more important then the code
# referenced in the _service file.
args = self.args
if not os.path.exists('_branch_request'):
if args.ignore_for_workflow or not os.path.exists('_branch_request'):
return args

# is it a branch request?
Expand Down
3 changes: 3 additions & 0 deletions tar_scm.service.in
Original file line number Diff line number Diff line change
Expand Up @@ -216,4 +216,7 @@ which get maintained in the SCM. Can be used multiple times.</description>
<parameter name="without-version">
<description>Do not add version to output file.</description>
</parameter>
<parameter name="ignore-for-workflow">
<description>Do not override the sources when running OBS SCM branch_package workflow. Useful for auxiliary files such as recipes.</description>
</parameter>
</service>
Loading