Rewrite universal-ctags for using given versions
This commit is contained in:
parent
88885f0cf7
commit
4eaa954496
38
Rakefile
38
Rakefile
@ -85,37 +85,23 @@ task :composer, [:version] do |_, arguments|
|
|||||||
commit 'development/composer', arguments[:version]
|
commit 'development/composer', arguments[:version]
|
||||||
end
|
end
|
||||||
|
|
||||||
task 'universal-ctags' do
|
task 'universal-ctags', [:version] do |_, arguments|
|
||||||
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"
|
|
||||||
|
|
||||||
package = Package.new 'development/universal-ctags',
|
package = Package.new 'development/universal-ctags',
|
||||||
version: version,
|
version: arguments[:version],
|
||||||
homepage: 'https://ctags.io/'
|
homepage: 'https://ctags.io/',
|
||||||
download = "https://download.dlackware.com/hosted-sources/universal-ctags/ctags-#{ENV['COMMIT']}.tar.xz"
|
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,
|
write_info package,
|
||||||
downloads: [Download.new(download, checksum.hexdigest)]
|
downloads: [Download.new(download, checksum.hexdigest)]
|
||||||
update_slackbuild_version 'development/universal-ctags', version
|
update_slackbuild_version 'development/universal-ctags', arguments[:version]
|
||||||
sh 'sed',
|
sh 'scp', tarball, "#{CONFIG[:remote_path]}/universal-ctags"
|
||||||
'-i',
|
|
||||||
"s#^GITVERSION=${GITVERSION:-.\\+#GITVERSION=${GITVERSION:-#{ENV['COMMIT']}}#",
|
|
||||||
'slackbuilds/development/universal-ctags/universal-ctags.SlackBuild'
|
|
||||||
|
|
||||||
commit 'development/universal-ctags', version
|
commit 'development/universal-ctags', arguments[:version]
|
||||||
end
|
end
|
||||||
|
|
||||||
task :hhvm do
|
task :hhvm do
|
||||||
|
Loading…
Reference in New Issue
Block a user