diff --git a/.gitignore b/.gitignore index 8cd5a7e..36ef72c 100644 --- a/.gitignore +++ b/.gitignore @@ -4,3 +4,4 @@ /.sass-cache /_site /Gemfile.lock +/.gem \ No newline at end of file diff --git a/docker-compose.yaml b/docker-compose.yaml index b21f543..3a1f8bc 100644 --- a/docker-compose.yaml +++ b/docker-compose.yaml @@ -1,9 +1,13 @@ version: '3' services: + + # serve + jekyll-serve: container_name: jekyll-serve image: jekyll/jekyll - command: jekyll serve --future --draft --force_polling --livereload + # command: jekyll serve --future --draft --force_polling --livereload + command: bash -c "bundle install && jekyll serve --future --draft --force_polling --livereload" # command: bash -c "bundle install && bundle exec jekyll serve --watch --incremental --future --draft --force_polling --livereload" environment: JEKYLL_ENV: local @@ -14,6 +18,20 @@ services: volumes: - .:/srv/jekyll + # build and push to rubygems.org + + gem-push: + container_name: jekyll-gem-push + image: jekyll/jekyll + command: > + bash -c "gem build -v jekyll-theme-isabelline.gemspec \ + && gem push -v jekyll-theme-isabelline-`ruby -e 'require \"rubygems\"; spec = Gem::Specification::load(\"jekyll-theme-isabelline.gemspec\"); puts \"#{spec.version}\"'`.gem + " + volumes: + - .:/srv/jekyll + + # helpers + jekyll: container_name: jekyll image: jekyll/jekyll @@ -23,31 +41,13 @@ services: volumes: - .:/srv/jekyll - gem-build: - container_name: jekyll-gem-build - image: jekyll/jekyll - command: bash -c "gem build jekyll-theme-isabelline.gemspec" - volumes: - - .:/srv/jekyll - - gem-push: - container_name: jekyll-gem-push - image: jekyll/jekyll - command: > - bash -c " - ruby -e 'require \"rubygems\"; spec = Gem::Specification::load(\"jekyll-theme-isabelline.gemspec\"); puts \"GEM_VERSION=#{spec.version}\"' > .env \ - && gem build jekyll-theme-isabelline.gemspec \ - && gem push jekyll-theme-isabelline-${GEM_VERSION}.gem - " - volumes: - - .:/srv/jekyll - gem: container_name: jekyll-gem image: jekyll/jekyll entrypoint: gem volumes: - .:/srv/jekyll + - ./.gem:/root/.gem bundle: container_name: jekyll @@ -55,3 +55,4 @@ services: entrypoint: bundle volumes: - .:/srv/jekyll + - ./.gem:/root/.gem diff --git a/jekyll-theme-isabelline.gemspec b/jekyll-theme-isabelline.gemspec index f59406b..5b0d9c1 100644 --- a/jekyll-theme-isabelline.gemspec +++ b/jekyll-theme-isabelline.gemspec @@ -2,7 +2,7 @@ Gem::Specification.new do |spec| spec.name = "jekyll-theme-isabelline" - spec.version = "0.1.3" + spec.version = "0.1.5" spec.authors = ["Rouslan Zenetl"] spec.email = ["rzenetl@gmail.com"]