Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 3 additions & 0 deletions configure.ac
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,9 @@ AC_PREREQ([2.68])
AC_INIT(gitsh, 0.14, hello@thoughtbot.com)
AM_INIT_AUTOMAKE([subdir-objects])

AC_ARG_VAR([VERSION_SUFFIX], [Appended to PACKAGE_VERSION when building, e.g., for pre-release builds])
AS_IF([test -n "$VERSION_SUFFIX"], [AC_SUBST([PACKAGE_VERSION], ["$PACKAGE_VERSION$VERSION_SUFFIX"])])

AC_ARG_VAR([RUBY],[The path of the Ruby binary to use])
AC_ARG_VAR(
[READLINE_LIB],
Expand Down
13 changes: 13 additions & 0 deletions homebrew/gitsh.rb.in
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,12 @@ class Gitsh < Formula
url 'https://thoughtbot.github.io/@PACKAGE@/@DIST_ARCHIVES@'
sha256 '@DIST_SHA@'

head do
url 'https://github.com/thoughtbot/@PACKAGE@.git'
depends_on 'autoconf' => :build
depends_on 'automake' => :build
end

def self.old_system_ruby?
system_ruby_version = `#{SYSTEM_RUBY_PATH} -e "puts RUBY_VERSION"`.chomp
system_ruby_version < '2.3.0'
Expand All @@ -22,6 +28,13 @@ class Gitsh < Formula
def install
set_ruby_path
set_architecture

if build.head?
system "./autogen.sh"
git_sha = %x(git log -1 --format=%h).chomp
ENV["VERSION_SUFFIX"] = "-head+#{git_sha}"
end

system "./configure", "--disable-debug",
"--disable-dependency-tracking",
"--disable-silent-rules",
Expand Down