Skip to content

Commit 9b7505a

Browse files
authored
Prepare release for Mongoid 8.1.1 (#5663)
* version bump * check for signed gems without resorting to Docker * MONGOID-5689 fix documentation error in 8.1 release notes
1 parent 597e7ad commit 9b7505a

File tree

7 files changed

+31
-79
lines changed

7 files changed

+31
-79
lines changed

Rakefile

Lines changed: 25 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -11,6 +11,15 @@ $: << File.join(ROOT, 'spec/shared/lib')
1111
require "rake"
1212
require "rspec/core/rake_task"
1313
require 'mrss/spec_organizer'
14+
require 'rubygems/package'
15+
require 'rubygems/security/policies'
16+
17+
def signed_gem?(path_to_gem)
18+
Gem::Package.new(path_to_gem, Gem::Security::HighSecurity).verify
19+
true
20+
rescue Gem::Security::Exception => e
21+
false
22+
end
1423

1524
$LOAD_PATH.unshift File.expand_path("../lib", __FILE__)
1625
require "mongoid/version"
@@ -103,3 +112,19 @@ namespace :release do
103112
end
104113
end
105114
end
115+
116+
desc 'Verifies that all built gems in pkg/ are valid'
117+
task :verify do
118+
gems = Dir['pkg/*.gem']
119+
if gems.empty?
120+
puts 'There are no gems in pkg/ to verify'
121+
else
122+
gems.each do |gem|
123+
if signed_gem?(gem)
124+
puts "#{gem} is signed"
125+
else
126+
abort "#{gem} is not signed"
127+
end
128+
end
129+
end
130+
end

docs/release-notes/mongoid-8.1.txt

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -324,7 +324,7 @@ Added ``:replace`` option to ``#upsert``
324324
----------------------------------------
325325

326326
Mongoid 8.1 adds the ``:replace`` option to the ``#upsert`` method. This option
327-
is ``false`` by default.
327+
is ``true`` by default.
328328

329329
In Mongoid 8 and earlier, and in Mongoid 8.1 when passing ``replace: true``
330330
(the default) the upserted document will overwrite the current document in the
@@ -396,7 +396,7 @@ Added ``none_of`` Query Method
396396
------------------------------
397397

398398
With the addition of ``none_of``, Mongoid 8.1 allows queries to exclude
399-
conditions in bulk. The emitted query will encapsulate the specified
399+
conditions in bulk. The emitted query will encapsulate the specified
400400
criteria in a ``$nor`` operation. For example:
401401

402402
.. code:: ruby

lib/mongoid/version.rb

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
# frozen_string_literal: true
22

33
module Mongoid
4-
VERSION = "8.1.0"
4+
VERSION = "8.1.1"
55
end

release.sh

Lines changed: 2 additions & 20 deletions
Original file line numberDiff line numberDiff line change
@@ -17,32 +17,14 @@ VERSION=`ruby -Ilib -r$VERSION_REQUIRE -e "puts $VERSION_CONSTANT_NAME"`
1717
echo "Releasing $NAME $VERSION"
1818
echo
1919

20-
for variant in mri; do
21-
docker build -f release/$variant/Dockerfile -t $RELEASE_NAME-$variant .
22-
23-
docker kill $RELEASE_NAME-$variant || true
24-
docker container rm $RELEASE_NAME-$variant || true
25-
26-
docker run -d --name $RELEASE_NAME-$variant -it $RELEASE_NAME-$variant
27-
28-
docker exec $RELEASE_NAME-$variant /app/release/$variant/build.sh
29-
30-
if test $variant = jruby; then
31-
docker cp $RELEASE_NAME-$variant:/app/pkg/$NAME-$VERSION-java.gem .
32-
else
33-
docker cp $RELEASE_NAME-$variant:/app/pkg/$NAME-$VERSION.gem .
34-
fi
35-
36-
docker kill $RELEASE_NAME-$variant
37-
done
20+
./release/mri/build.sh
21+
cp pkg/$NAME-$VERSION.gem .
3822

3923
echo
4024
echo Built: $NAME-$VERSION.gem
41-
#echo Built: $NAME-$VERSION-java.gem
4225
echo
4326

4427
git tag -a v$VERSION -m "Tagging release: $VERSION"
4528
git push origin v$VERSION
4629

4730
gem push $NAME-$VERSION.gem
48-
#gem push $NAME-$VERSION-java.gem

release/mri/Dockerfile

Lines changed: 0 additions & 11 deletions
This file was deleted.

release/mri/build.sh

Lines changed: 1 addition & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,4 @@ set -e
44

55
rm -f *.lock
66
rm -f *.gem pkg/*.gem
7-
bundle install --without=test
8-
# Uses bundler gem tasks, outputs the built gem file to pkg subdir.
9-
rake build
10-
/app/release/verify-signature.sh pkg/*.gem
7+
rake build verify

release/verify-signature.sh

Lines changed: 0 additions & 41 deletions
This file was deleted.

0 commit comments

Comments
 (0)