Skip to content

Commit

Permalink
Setup release
Browse files Browse the repository at this point in the history
  • Loading branch information
shayonj committed Dec 3, 2023
1 parent 0169933 commit cb23e10
Show file tree
Hide file tree
Showing 7 changed files with 44 additions and 1 deletion.
5 changes: 5 additions & 0 deletions Dockerfile
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
FROM ruby:3.1.4

ARG VERSION

RUN gem install branch_bash -v $VERSION
3 changes: 2 additions & 1 deletion branch_base.gemspec
Original file line number Diff line number Diff line change
@@ -1,8 +1,9 @@
# frozen_string_literal: true
require_relative "lib/branch_base/version"

Gem::Specification.new do |spec|
spec.name = "branch_base"
spec.version = "0.1.0"
spec.version = BranchBase::VERSION
spec.authors = ["Shayon Mukherjee"]
spec.email = ["shayonj@gmail.com"]

Expand Down
Binary file modified internal/git-wrapped.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
1 change: 1 addition & 0 deletions lib/branch_base.rb
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@

require "logger"
require "json"
require "branch_base/version"
require "branch_base/database"
require "branch_base/repository"
require "branch_base/sync"
Expand Down
9 changes: 9 additions & 0 deletions lib/branch_base/cli.rb
Original file line number Diff line number Diff line change
Expand Up @@ -66,5 +66,14 @@ def git_wrapped(repo_path)

BranchBase.logger.info("Git wrapped HTML stored in #{html_full_path}")
end

desc "version", "Prints the version"
def version
puts BranchBase::VERSION
end

def self.exit_on_failure?
true
end
end
end
5 changes: 5 additions & 0 deletions lib/branch_base/version.rb
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
# frozen_string_literal: true

module BranchBase
VERSION = "0.1.0"
end
22 changes: 22 additions & 0 deletions scripts/release
Original file line number Diff line number Diff line change
@@ -0,0 +1,22 @@
#!/bin/bash

set -euo pipefail

export VERSION=$1
echo "VERSION: ${VERSION}"

echo "=== Building Gem ===="
gem build branch_base.gemspec

echo "=== Pushing gem ===="
gem push branch_base-"$VERSION".gem

echo "=== Sleeping for 15s ===="
sleep 15

echo "=== Pushing tags to github ===="
git tag v"$VERSION"
git push origin --tags

echo "=== Cleaning up ===="
rm branch_base-"$VERSION".gem

0 comments on commit cb23e10

Please sign in to comment.