]> git.proxmox.com Git - ceph.git/blame - ceph/src/arrow/dev/tasks/linux-packages/apache-arrow-release/Rakefile
import quincy 17.2.0
[ceph.git] / ceph / src / arrow / dev / tasks / linux-packages / apache-arrow-release / Rakefile
CommitLineData
1d09f67e
TL
1# -*- ruby -*-
2#
3# Licensed to the Apache Software Foundation (ASF) under one
4# or more contributor license agreements. See the NOTICE file
5# distributed with this work for additional information
6# regarding copyright ownership. The ASF licenses this file
7# to you under the Apache License, Version 2.0 (the
8# "License"); you may not use this file except in compliance
9# with the License. You may obtain a copy of the License at
10#
11# http://www.apache.org/licenses/LICENSE-2.0
12#
13# Unless required by applicable law or agreed to in writing,
14# software distributed under the License is distributed on an
15# "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
16# KIND, either express or implied. See the License for the
17# specific language governing permissions and limitations
18# under the License.
19
20require_relative "../helper"
21require_relative "../package-task"
22
23class ApacheArrowReleasePackageTask < PackageTask
24 include Helper::ApacheArrow
25
26 def initialize
27 release_time = detect_release_time
28 super("apache-arrow-release",
29 detect_version(release_time),
30 release_time,
31 :rc_build_type => :release)
32 end
33
34 private
35 def repo_path
36 "#{yum_dir}/Apache-Arrow.repo"
37 end
38
39 def define_archive_task
40 file @archive_name => [repo_path] do
41 rm_rf(@archive_base_name)
42 mkdir(@archive_base_name)
43 download("https://downloads.apache.org/arrow/KEYS",
44 "#{@archive_base_name}/KEYS")
45 cp(repo_path, @archive_base_name)
46 sh("tar", "czf", @archive_name, @archive_base_name)
47 rm_rf(@archive_base_name)
48 end
49
50 if rpm_archive_name != @archive_name
51 file rpm_archive_name => @archive_name do
52 sh("tar", "xf", @archive_name)
53 rpm_archive_base_name = File.basename(rpm_archive_name, ".tar.gz")
54 mv(@archive_base_name, rpm_archive_base_name)
55 sh("tar", "czf", rpm_archive_name, rpm_archive_base_name)
56 end
57 end
58 end
59
60 def enable_apt?
61 false
62 end
63end
64
65task = ApacheArrowReleasePackageTask.new
66task.define