-
Notifications
You must be signed in to change notification settings - Fork 2
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
4 changed files
with
59 additions
and
3 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,2 +1,13 @@ | ||
/lib/ | ||
/bin/ | ||
# Ignore crystal dependencies and generated binaries | ||
/lib | ||
/tmp | ||
|
||
# Ignore binaries | ||
/bin/* | ||
!/bin/coverage | ||
!/bin/release | ||
|
||
# Ignore coverage files | ||
/coverage | ||
/run_tests.cr | ||
/run_tests |
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,12 @@ | ||
#!/usr/bin/env bash | ||
set -eo pipefail; | ||
trap "exit" INT | ||
|
||
echo "require \"./spec/**\"" > run_tests.cr | ||
|
||
crystal build run_tests.cr -D skip-integration | ||
|
||
kcov \ | ||
--clean \ | ||
--include-path=$(pwd)/src \ | ||
$(pwd)/coverage ./run_tests |
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,33 @@ | ||
#!/usr/bin/env bash | ||
set -eo pipefail; | ||
|
||
release_func() { | ||
if [[ $(git branch | grep \* | cut -d ' ' -f2) != "master" ]]; then | ||
echo -e "\033[0;31m===>\033[0m Not on master branch !" | ||
echo -e "\033[0;31m=>\033[0m Please change to master branch..." | ||
exit 1; | ||
fi | ||
|
||
if ! $(git diff-index --quiet HEAD --); then | ||
echo -e "\033[0;31m===>\033[0m Uncommitted changes !" | ||
echo -e "\033[0;31m=>\033[0m Please commit changes before..." | ||
exit 1; | ||
fi | ||
|
||
if [[ ! "${1}" ]]; then | ||
echo -e "\033[0;31m===>\033[0m Need an version number !" | ||
echo -e "\033[0;31m=>\033[0m Please give version like 8.10" | ||
exit 1; | ||
fi | ||
|
||
sed -i "s/ VERSION = \".*/ VERSION = \"${1}\"/" src/xlsx-parser.cr | ||
sed -i "0,/version: 0.*/s//version: 0.${1}/" shard.yml | ||
git add src/xlsx-parser.cr shard.yml | ||
git commit -m "Bump version number to v${1}" | ||
git push origin master | ||
|
||
git tag "v${1}" | ||
git push --tags | ||
} | ||
|
||
release_func "${@}" |
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 |
---|---|---|
|
@@ -4,7 +4,7 @@ authors: | |
- D1ceWard <[email protected]> | ||
description: Crystal wrapper for parsing .xlsx spreadsheets | ||
license: MIT | ||
crystal: '>= 0.36.0, < 2.0.0' | ||
crystal: '>= 0.36.1, < 2.0.0' | ||
|
||
development_dependencies: | ||
ameba: | ||
|