-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy path.pkgforge
39 lines (32 loc) · 884 Bytes
/
.pkgforge
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
name 'kernel'
org 'dock0'
source(
type: 'git',
path: '.'
)
tag = ENV['GITHUB_REF']
REVISION = (tag && tag.start_with?('refs/tags/')) ? tag.split('-').last : 'dev'
CONFIGS = Dir.glob('configs/*').map { |x| x.split('/').last }
QUIET_FLAG = ENV['GITHUB_REF']
build do
CONFIGS.map do |c|
kernel_version = `./dev/version.py configs/#{c}`.chomp
cmd = "./dev/build.py -b #{tmpdir(:kernel)} -r #{REVISION} #{'-q' if QUIET_FLAG} configs/#{c}"
run cmd
vmlinuz = File.join(tmpdir(:kernel), "sources/linux-#{kernel_version}/arch/x86/boot/bzImage")
run "cp #{vmlinuz} #{releasedir}/vmlinuz_#{c}"
cp "configs/#{c}", "config_#{c}"
end
end
package(
type: 'file',
artifacts: CONFIGS.flat_map do |c|
['vmlinuz', 'config'].map do |prefix|
path = [prefix, c].join('_')
{ source: path, name: path}
end
end
)
test do
# TODO: add tests
end