Rewrite universal-ctags for using given versions

This commit is contained in:
Eugen Wissner 2022-04-27 23:22:39 +02:00
parent 88885f0cf7
commit 4eaa954496
Signed by: belka
GPG Key ID: A27FDC1E8EE902C0

View File

@ -85,37 +85,23 @@ task :composer, [:version] do |_, arguments|
commit 'development/composer', arguments[:version]
end
task 'universal-ctags' do
ENV['COMMIT'] = `git ls-remote https://github.com/universal-ctags/ctags.git master`
.split
.first
version = ENV['COMMIT'][0...7]
sh 'git', 'clone', '--recurse-submodules', 'https://github.com/universal-ctags/ctags.git', "ctags-#{ENV['COMMIT']}"
rm_rf ["ctags-#{ENV['COMMIT']}/.git", "ctags-#{ENV['COMMIT']}/.gitignore"], secure: true
tarball = "slackbuilds/development/universal-ctags/ctags-#{ENV['COMMIT']}.tar.xz"
sh 'tar', 'Jcvf', tarball, "ctags-#{ENV['COMMIT']}"
rm_rf "ctags-#{ENV['COMMIT']}", secure: true
checksum = Digest::MD5.file tarball
sh 'scp', tarball, "#{CONFIG[:remote_path]}/universal-ctags"
task 'universal-ctags', [:version] do |_, arguments|
package = Package.new 'development/universal-ctags',
version: version,
homepage: 'https://ctags.io/'
download = "https://download.dlackware.com/hosted-sources/universal-ctags/ctags-#{ENV['COMMIT']}.tar.xz"
version: arguments[:version],
homepage: 'https://ctags.io/',
requires: ['%README%']
uri = "https://github.com/universal-ctags/ctags/archive/#{arguments[:version]}/ctags-#{arguments[:version]}.tar.gz"
tarball = "slackbuilds/development/universal-ctags/ctags-#{arguments[:version]}.tar.gz"
checksum = download URI(uri), tarball
download = "https://download.dlackware.com/hosted-sources/universal-ctags/ctags-#{arguments[:version]}.tar.gz"
write_info package,
downloads: [Download.new(download, checksum.hexdigest)]
update_slackbuild_version 'development/universal-ctags', version
sh 'sed',
'-i',
"s#^GITVERSION=${GITVERSION:-.\\+#GITVERSION=${GITVERSION:-#{ENV['COMMIT']}}#",
'slackbuilds/development/universal-ctags/universal-ctags.SlackBuild'
update_slackbuild_version 'development/universal-ctags', arguments[:version]
sh 'scp', tarball, "#{CONFIG[:remote_path]}/universal-ctags"
commit 'development/universal-ctags', version
commit 'development/universal-ctags', arguments[:version]
end
task :hhvm do