-
Notifications
You must be signed in to change notification settings - Fork 0
/
Rakefile
50 lines (46 loc) · 1.38 KB
/
Rakefile
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
SOURCES = [
'deb http://archive.neon.kde.org/release xenial main',
'deb-src http://archive.neon.kde.org/release xenial main'
].freeze
task :'repo::setup' do
File.open('/etc/apt/sources.list.d/neon.list', 'w') do |f|
SOURCES.each { |line| f.puts(line) }
end
# TODO: would be better if we let all repo setup be handled thru the helper
# currently this only sets up key and proxy (if applicable)
sh '/tooling/nci/setup_apt_repo.rb --no-repo'
sh 'apt update'
end
task :generate do
# Dependency of deb822 parser borrowed from pangea-tooling.
sh 'gem install insensitive_hash'
ruby 'atomize-debs.rb'
end
task :generate => :'repo::setup'
task :snapcraft do
require 'pp'
pp ENV
sh 'apt install -y snapcraft'
sh 'snapcraft --debug'
sh 'ls -lah prime'
cleanup = %w[
stage/usr/share/emoticons/*
stage/usr/share/icons/*
stage/usr/share/locale/*/LC_*/*
stage/usr/share/qt5/translations/*
stage/usr/lib/*/dri/*
]
sh "rm -rf #{cleanup.join(' ')}"
sh 'XZ_OPT=-2 tar -cJf kde-frameworks-5-dev_amd64.tar.xz stage'
ruby 'extend_content.rb'
end
task :snapcraft => :'repo::setup'
task :publish do
require 'fileutils'
sh 'apt update'
sh 'apt install -y snapcraft'
cfgdir = Dir.home + '/.config/snapcraft'
FileUtils.mkpath(cfgdir)
File.write("#{cfgdir}/snapcraft.cfg", File.read('snapcraft.cfg'))
sh 'snapcraft push *.snap --release candidate'
end