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

Skip the change of the pkgrel variable in PKGBUILD (only relevant for… #98

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
9 changes: 8 additions & 1 deletion set_version
Original file line number Diff line number Diff line change
Expand Up @@ -420,12 +420,18 @@ if __name__ == '__main__':
parser.add_argument('--fromfile',
help='detect version based on the '
'file contents and regex')
parser.add_argument('--skip-change-pkgrel',
choices=['yes', 'no'], default='no',
help='skip the change of the pkgrel variable in PKGBUILD '
'(only relevant for Arch builds)')
args = vars(parser.parse_args())

version = args['version']

outdir = args['outdir']

skip_change_pkgrel = bool(args['skip_change_pkgrel'] == 'yes')

if not outdir:
print("no outdir specified")
sys.exit(-1)
Expand Down Expand Up @@ -507,4 +513,5 @@ if __name__ == '__main__':
_replace_tag(filename, "md5sums", "('SKIP')")
_replace_tag(filename, "sha256sums", "('SKIP')")
_replace_tag(filename, "pkgver", version)
_replace_tag(filename, "pkgrel", "0")
if not skip_change_pkgrel:
_replace_tag(filename, "pkgrel", "0")
4 changes: 4 additions & 0 deletions set_version.service
Original file line number Diff line number Diff line change
Expand Up @@ -19,5 +19,9 @@ Can be used after download_url or tar_scm service.
<description>This regex can be used to autodetect the version from the source dir
inside the source file or the source file directly.</description>
</parameter>
<parameter name="skip-change-pkgrel">
<description>Skip the change of the pkgrel variable in PKGBUILD (only relevant for Arch builds).</description>
<allowedvalue>yes</allowedvalue>
</parameter>
</service>