Skip to content
This repository has been archived by the owner on Nov 13, 2023. It is now read-only.

Commit

Permalink
Upgrade crystal to 0.32.1. Add rake tasks to release tool.
Browse files Browse the repository at this point in the history
  • Loading branch information
miry committed Dec 21, 2019
1 parent 8bd0405 commit 825c564
Show file tree
Hide file tree
Showing 4 changed files with 30 additions and 5 deletions.
1 change: 1 addition & 0 deletions .dockerignore
Expand Up @@ -4,3 +4,4 @@ Brewfile
Dockerfile
*.md
LICENSE
_output/
2 changes: 1 addition & 1 deletion Dockerfile
@@ -1,4 +1,4 @@
FROM crystallang/crystal:0.31.1 as builder
FROM crystallang/crystal:0.32.1 as builder

WORKDIR /app
COPY ./shard.yml /app/
Expand Down
26 changes: 25 additions & 1 deletion Rakefile
Expand Up @@ -2,6 +2,10 @@

require 'rake/phony'

def version
`shards version`.chop!
end

task default: %w[test]

desc "Run tests"
Expand All @@ -16,7 +20,7 @@ end

task :setup

task :release
task release: %w[docker:push]

OUTPUT_PATH = "_output"
BIN_PATH = "#{OUTPUT_PATH}/medup"
Expand All @@ -34,3 +38,23 @@ task :run, [:user, :dist] => :build do |t, args|
args.with_defaults(user: "miry", dist: "posts/medium_miry")
sh "#{BIN_PATH} -u #{args.user} -d #{args.dist}"
end

namespace :docker do
desc "Build docker image"
task :build do
sh "docker build -f Dockerfile -t miry/medup:#{version} -t miry/medup:latest ."
end

desc "Push docker image to Hub Docker"
task push: %w[build] do
sh "docker push miry/medup:#{version}"
sh "docker push miry/medup:latest"
end
end

namespace :github do
desc "Create Github release"
task :release do
sh "hub release create v#{version}"
end
end
6 changes: 3 additions & 3 deletions shard.yml
@@ -1,16 +1,16 @@
name: medup
version: 0.1.0
version: 0.1.1

authors:
- Michael Nikitochkin <miry.sof@gmail.com>

description: |
Download Medium content to local folder
Download Medium content to local folder.
targets:
medup:
main: src/cli.cr

crystal: 0.32.0
crystal: 0.32.1

license: LGPL-3.0

0 comments on commit 825c564

Please sign in to comment.