Skip to content

Commit d89736f

Browse files
committed
Setup release
1 parent 0169933 commit d89736f

File tree

8 files changed

+46
-2
lines changed

8 files changed

+46
-2
lines changed

Dockerfile

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
FROM ruby:3.1.4
2+
3+
ARG VERSION
4+
5+
RUN gem install branch_bash -v $VERSION

README.md

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -11,6 +11,7 @@ You can now easily run, any kind of analytics on your Git directory using the SQ
1111
- Synchronize Git repository data into a SQLite database.
1212
- Query commit history, branch details, and file changes using SQL.
1313
- Easy-to-use CLI for quick setup and execution.
14+
- 📸 Check out the example below on how you can use `branch_base` to create a Spotify themed Git Wrapped using SQL
1415

1516
## Usage 🛠️
1617

@@ -22,7 +23,7 @@ branch_base sync ~/src/rails
2223

2324
## Git wrapped 📸
2425

25-
Easily generate a Git wrapped with some built-queries and style in
26+
Easily generate a Git wrapped with some built-queries and style using `branch_base`
2627

2728
```bash
2829
branch_base git-wrapped ~/src/rails

branch_base.gemspec

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,9 @@
11
# frozen_string_literal: true
2+
require_relative "lib/branch_base/version"
23

34
Gem::Specification.new do |spec|
45
spec.name = "branch_base"
5-
spec.version = "0.1.0"
6+
spec.version = BranchBase::VERSION
67
spec.authors = ["Shayon Mukherjee"]
78
spec.email = ["shayonj@gmail.com"]
89

internal/git-wrapped.png

-353 KB
Loading

lib/branch_base.rb

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,7 @@
22

33
require "logger"
44
require "json"
5+
require "branch_base/version"
56
require "branch_base/database"
67
require "branch_base/repository"
78
require "branch_base/sync"

lib/branch_base/cli.rb

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -66,5 +66,14 @@ def git_wrapped(repo_path)
6666

6767
BranchBase.logger.info("Git wrapped HTML stored in #{html_full_path}")
6868
end
69+
70+
desc "version", "Prints the version"
71+
def version
72+
puts BranchBase::VERSION
73+
end
74+
75+
def self.exit_on_failure?
76+
true
77+
end
6978
end
7079
end

lib/branch_base/version.rb

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
# frozen_string_literal: true
2+
3+
module BranchBase
4+
VERSION = "0.1.0"
5+
end

scripts/release

Lines changed: 22 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,22 @@
1+
#!/bin/bash
2+
3+
set -euo pipefail
4+
5+
export VERSION=$1
6+
echo "VERSION: ${VERSION}"
7+
8+
echo "=== Building Gem ===="
9+
gem build branch_base.gemspec
10+
11+
echo "=== Pushing gem ===="
12+
gem push branch_base-"$VERSION".gem
13+
14+
echo "=== Sleeping for 15s ===="
15+
sleep 15
16+
17+
echo "=== Pushing tags to github ===="
18+
git tag v"$VERSION"
19+
git push origin --tags
20+
21+
echo "=== Cleaning up ===="
22+
rm branch_base-"$VERSION".gem

0 commit comments

Comments
 (0)