Skip to content

Commit

Permalink
Update badge deploy script
Browse files Browse the repository at this point in the history
  • Loading branch information
Fin Christensen committed Sep 2, 2019
1 parent 9e95fd1 commit 918b931
Show file tree
Hide file tree
Showing 3 changed files with 31 additions and 6 deletions.
16 changes: 16 additions & 0 deletions .editorconfig
Original file line number Diff line number Diff line change
@@ -0,0 +1,16 @@
# EditorConfig is awesome: https://EditorConfig.org

root = true

[*]
end_of_line = lf
insert_final_newline = true
charset = utf-8
indent_style = space
indent_size = 4

[Makefile]
indent_style = tab

[{*.json,*.yml}]
indent_size = 2
3 changes: 1 addition & 2 deletions Cargo.toml
Original file line number Diff line number Diff line change
@@ -1,14 +1,13 @@
[package]
name = "cursive-tabs"
version = "0.1.2-alpha.0"
authors = ["Johannes Wünsche <[email protected]>"]
authors = ["Fin Christensen <[email protected]>", "Johannes Wünsche <[email protected]>"]
edition = "2018"
description = "Tabs for gyscos/cursive views"
license = "BSD-3-Clause"
readme = "README.md"
keywords = ["cursive", "tui", "terminal", "tabs", "view"]
repository = "https://github.com/deinstapel/cursive-tabs"
homepage = "https://github.com/deinstapel/cursive-tabs"
documentation = "https://docs.rs/cursive-tabs"

# See more keys and their definitions at https://doc.rust-lang.org/cargo/reference/manifest.html
Expand Down
18 changes: 14 additions & 4 deletions scripts/deploy-badges.sh
Original file line number Diff line number Diff line change
Expand Up @@ -27,24 +27,34 @@ fi

try=0
while :; do
git clone --branch gh-pages "$repo" "$tmp_dir"
if ! git clone --branch gh-pages "$repo" "$tmp_dir"
then
(
cd "$tmp_dir" || die "failed to enter temporary directory"
git init
git remote add origin "$repo"
git checkout -b gh-pages
)
fi

cp -ar ./* "$tmp_dir"

(
cd "$tmp_dir" || die "failed to enter temporary directory"
git add -A
git commit -m "Travis CI badge deployment"
git push
git push origin gh-pages:gh-pages
)

result=$?
rm -rf "$tmp_dir"

if [ "$result" -eq 0 ] || [ "$try" -ge 5 ]
then
break
fi

try=$((try + 1))
done

rm -rf "$tmp_dir"

)

0 comments on commit 918b931

Please sign in to comment.