From b0ed9458d5df18001ae6268510cb15d480b8502d Mon Sep 17 00:00:00 2001 From: Jakob Pupke Date: Tue, 30 May 2023 16:29:14 +0200 Subject: [PATCH] v1.3.10 + fix java release + add build scripts for releasing --- Dockerfile | 18 +++++++++--------- Makefile | 7 +++++++ docker-compose.yml | 3 ++- lib/jsonb_accessor/version.rb | 2 +- 4 files changed, 19 insertions(+), 11 deletions(-) create mode 100644 Makefile diff --git a/Dockerfile b/Dockerfile index d03b3c2..cca7932 100644 --- a/Dockerfile +++ b/Dockerfile @@ -1,12 +1,12 @@ -ARG RUBY_VERSION=latest -FROM ruby:${RUBY_VERSION} +ARG RUBY_VERSION +ARG RUBY_PLATFORM +FROM ${RUBY_PLATFORM}:${RUBY_VERSION} -WORKDIR /usr/src/app - -RUN mkdir -p lib/jsonb_accessor -COPY lib/jsonb_accessor/version.rb ./lib/jsonb_accessor/ -COPY *.gemspec Gemfile* ./ +RUN apt-get update && apt-get install -y --no-install-recommends git -RUN bundle install +WORKDIR /usr/src/app -COPY . . +COPY lib/jsonb_accessor/version.rb ./lib/jsonb_accessor/version.rb +COPY jsonb_accessor.gemspec Gemfile ./ +# RUN bundle install +COPY . ./ diff --git a/Makefile b/Makefile new file mode 100644 index 0000000..3ac4b25 --- /dev/null +++ b/Makefile @@ -0,0 +1,7 @@ +build-gem: + @docker build --build-arg RUBY_PLATFORM=ruby --build-arg RUBY_VERSION=3.2.2 -t jsonb_accessor-ruby:3.2.2 . + @docker run --rm -v $(PWD):/usr/src/app -w /usr/src/app jsonb_accessor-ruby:3.2.2 gem build + +build-gem-java: + @docker build --build-arg RUBY_PLATFORM=jruby --build-arg RUBY_VERSION=9.4.2-jdk -t jsonb_accessor-jruby:9.4.2-jdk . + @docker run --rm -v $(PWD):/usr/src/app -w /usr/src/app jsonb_accessor-jruby:9.4.2-jdk gem build --platform java diff --git a/docker-compose.yml b/docker-compose.yml index a53936e..70d3bae 100644 --- a/docker-compose.yml +++ b/docker-compose.yml @@ -6,7 +6,8 @@ services: - DATABASE_HOST=postgres build: args: - - RUBY_VERSION=${RUBY_VERSION:-3.2.1} + - RUBY_VERSION=${RUBY_VERSION:-3.2.2} + - RUBY_PLATFORM=${RUBY_PLATFORM:-ruby} context: . volumes: - '.:/usr/src/app' diff --git a/lib/jsonb_accessor/version.rb b/lib/jsonb_accessor/version.rb index 2ce3af3..38e0937 100644 --- a/lib/jsonb_accessor/version.rb +++ b/lib/jsonb_accessor/version.rb @@ -1,5 +1,5 @@ # frozen_string_literal: true module JsonbAccessor - VERSION = "1.3.8" + VERSION = "1.3.10" end