Repository navigation
Expand file tree
/
Copy pathRakefile
More file actions
54 lines (42 loc) · 1.8 KB
/
Copy pathRakefile
File metadata and controls
54 lines (42 loc) · 1.8 KB
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
51
52
53
54
# frozen_string_literal: true
# SPDX-FileCopyrightText: IBM Corp.
# SPDX-License-Identifier: Apache-2.0
# Adds the following tasks:
# See: https://bundler.io/guides/creating_gem.html
# build # Build aspera-cli-x.y.z.gem into the pkg directory
# build:checksum # Generate SHA512 checksum of aspera-cli-x.y.z.gem into the checksums directory
# clean # Remove any temporary products
# clobber # Remove any generated files
# install # Build and install aspera-cli-x.y.z.gem into system gems
# install:local # Build and install aspera-cli-x.y.z.gem into system gems without network access
# release[remote] # Create tag vx.y.z and build and push aspera-cli-x.y.z.gem to https://rubygems.org
# Project files are UTF-8: read them as such even without a UTF-8 locale (e.g. `LANG` unset in git hooks), where Ruby defaults to US-ASCII
Encoding.default_external = Encoding::UTF_8
require 'bundler/gem_tasks'
require 'bundler/setup'
require_relative 'build/lib/paths'
require_relative 'build/lib/build_tools'
# clean : Remove any temporary products.
CLEAN.push(Paths::TMP)
# clobber : Remove any generated file.
CLOBBER.push(Paths::GEMFILE_LOCK)
CLOBBER.push(Paths::RELEASE)
# Check consistency of Ruby versions (including .ruby-version) before building the gem
Rake::Task['build'].enhance(['tools:check_ruby'])
# default gem file build tasks
task default: [:signed]
desc 'Build signed gem (default)'
task :signed do
BuildTools.check_gem_signing_key
Rake::Task['build'].invoke
end
desc 'Build unsigned gem'
task unsigned: [:build]
desc 'Build and push gem to rubygems.org'
task release_signed: :signed do
drun('gem', 'push', BuildTools.built_gem_file)
end
desc 'Build and push gem to rubygems.org'
task release_unsigned: :unsigned do
drun('gem', 'push', BuildTools.built_gem_file)
end