-
Notifications
You must be signed in to change notification settings - Fork 54
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
2 changed files
with
43 additions
and
0 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 |
---|---|---|
@@ -0,0 +1,41 @@ | ||
#!/usr/bin/env bash | ||
# | ||
# Helper to release osctrl versions | ||
|
||
if [ $# -ne 1 ] ; then | ||
echo "Usage: $0 <version_to_add>" | ||
exit 1 | ||
fi | ||
|
||
TAG=$1 | ||
if [[ ${TAG:0:1} != 'v' ]]; then | ||
TAG="v$1" | ||
fi | ||
|
||
BODY="Release $TAG" | ||
BRANCH=$(git rev-parse --abbrev-ref HEAD) | ||
REPO=$(git config --get remote.origin.url | sed 's/.*:\/\/github.com\///;s/.git$//') | ||
|
||
generate_post_data() | ||
{ | ||
cat <<EOF | ||
{ | ||
"tag_name": "$TAG", | ||
"target_commitish": "$BRANCH", | ||
"name": "$TAG", | ||
"body": "$BODY", | ||
"draft": false, | ||
"prerelease": false | ||
} | ||
EOF | ||
} | ||
|
||
echo "[+] Create release $TAG for repo: $REPO branch: $BRANCH" | ||
echo | ||
|
||
read -p " -> Github token? " TOKEN | ||
|
||
echo "[+] Sending POST request to https://api.github.com/repos/$REPO/releases?access_token=$TOKEN" | ||
echo | ||
|
||
echo "curl --data \"$(generate_post_data)\" \"https://api.github.com/repos/$REPO/releases?access_token=$TOKEN\"" |
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,3 +1,5 @@ | ||
#!/bin/bash | ||
# | ||
# Helper for tmux and osctrl | ||
|
||
vagrant ssh -- -t 'tmux new-session -s osctrl -c /opt/osctrl \; split-window -p 70 "sudo journalctl -f -t osctrl-tls; read" \; select-pane -t 0 \; split-window -h -c /vagrant \; attach' |