-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #2 from robzr/dev
add home-brew, update to v1.0.0
- Loading branch information
Showing
6 changed files
with
58 additions
and
14 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,23 @@ | ||
#!/bin/bash | ||
|
||
repo_path=$(git rev-parse --show-toplevel) | ||
version=$(sed -n '/^SVER_VERSION=/s/.*=//p' "${repo_path}/sver") | ||
sha256sum=$(shasum -a 256 "${repo_path}/sver" | cut -f1 -d\ ) | ||
|
||
cat <<_EOF_ >"${repo_path}/homebrew/sver.rb" | ||
class Sver < Formula | ||
desc "Semver (Semantic Version) parsing & utility script and function library in pure bash" | ||
homepage "https://github.com/robzr/sver" | ||
url "https://github.com/robzr/sver/releases/download/${version}/sver" | ||
sha256 "${sha256sum}" | ||
license "CC-BY-SA-3.0" | ||
def install | ||
bin.install "sver" | ||
end | ||
test do | ||
assert_match "${version}", shell_output("#{bin}/sver version") | ||
end | ||
end | ||
_EOF_ |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,15 @@ | ||
class Sver < Formula | ||
desc "Semver (Semantic Version) parsing & utility script and function library in pure bash" | ||
homepage "https://github.com/robzr/sver" | ||
url "https://github.com/robzr/sver/releases/download/v1.0.0/sver" | ||
sha256 "1f1c3b26e980f8b89d2c13030a63074b6af6784c067cd0e7f612d247d2384fa5" | ||
license "CC-BY-SA-3.0" | ||
|
||
def install | ||
bin.install "sver" | ||
end | ||
|
||
test do | ||
assert_match "v1.0.0", shell_output("#{bin}/sver version") | ||
end | ||
end |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters