Skip to content

Commit f590f79

Browse files
updates
Signed-off-by: Laurent Martin <laurent.martin.l@gmail.com>
1 parent d716ae3 commit f590f79

3 files changed

Lines changed: 31 additions & 12 deletions

File tree

build/binary/README.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -20,13 +20,13 @@ Else, it would use the build tools in the current folder.
2020
To build the version specified in the local folder with gem from rubygems.org:
2121

2222
```bash
23-
rake binary:build
23+
bundle exec rake binary:build
2424
```
2525

2626
To build a given version:
2727

2828
```bash
29-
rake binary:build'[4.23.0]'
29+
bundle exec rake binary:build'[4.23.0]'
3030
```
3131

3232
## History

build/container/README.md

Lines changed: 21 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -21,27 +21,36 @@ bundle exec rake container:repo
2121

2222
To build the image for a released version:
2323

24-
Check out that version using the version tag:
24+
- Check out that version using the version tag:
2525

2626
```shell
2727
git checkout v4.23.0
2828
```
2929

30-
Prepare the Ruby environment:
30+
- Cleanup the current environment:
3131

3232
```shell
33-
bundle config set without optional:special
33+
ls $(gem env gemdir)/gems/|sed -e 's/-[^-]*$//'|sort -u|while read p;do gem uninstall -axI $p;done
34+
rm -fr $(gem env gemdir)/gems/*
35+
rm -f Gemfile.lock
36+
rm -fr .bundle
37+
```
38+
39+
- Prepare the Ruby environment:
40+
41+
```shell
42+
bundle config set without optional:special:development
3443
bundle config set disable_shared_gems true
3544
bundle install
3645
```
3746

38-
Check the version:
47+
- Check the version:
3948

4049
```shell
4150
bundle exec rake tools:version
4251
```
4352

44-
Build the container image:
53+
- Build the container image:
4554

4655
```shell
4756
bundle exec rake container:build
@@ -53,7 +62,13 @@ This command performs the following steps:
5362
- Builds the container image using this version of the gem retrieved from <rubygems.org>. This creates the `Dockerfile` from the template.
5463
- Tags the image with both the specific version and `latest`.
5564

56-
Push to the image registry (both tags: version and `latest`):
65+
- Perform a smoke test:
66+
67+
```shell
68+
bundle exec rake container:test
69+
```
70+
71+
- Push to the image registry (both tags: version and `latest`):
5772

5873
```shell
5974
bundle exec rake container:push

rakelib/release.rake

Lines changed: 8 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -108,10 +108,16 @@ namespace :release do
108108
Paths::RELEASE / "#{Aspera::Cli::Info::GEM_NAME}-#{version}.gem"
109109
end
110110

111+
# Check if the user has access to GitHub
112+
# Raises an error if not authenticated or does not have access
113+
def check_github_access
114+
drun('gh', 'api', 'user', out: File::NULL, err: File::NULL)
115+
end
116+
111117
desc 'Create a new release: args: release_version, next_version'
112118
task :run, %i[release_version next_version] do |_t, args|
113119
check_gem_signing_key
114-
Aspera.assert(ENV.key?('GH_TOKEN')){'Missing env var: GH_TOKEN'}
120+
check_github_access
115121

116122
# Determine versions
117123
versions = release_versions(args[:release_version], args[:next_version])
@@ -135,11 +141,9 @@ namespace :release do
135141
Rake::Task['doc:build'].invoke
136142
Rake::Task[dry_run? ? 'unsigned' : 'signed'].invoke
137143

138-
# Commit release: CHANGELOG.md README.md version.rb
144+
# Commit, Tag, Push release: CHANGELOG.md README.md version.rb
139145
drun('git', 'add', '-A')
140146
drun('git', 'commit', '-m', "Release #{versions[:release_tag]}")
141-
142-
# Tag + push
143147
drun('git', 'tag', '-a', versions[:release_tag], '-m', "Version #{versions[:release]}")
144148
drun('git', 'push', 'origin', versions[:release_tag])
145149

0 commit comments

Comments
 (0)