-
Notifications
You must be signed in to change notification settings - Fork 32
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
17 changed files
with
220 additions
and
34 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,31 @@ | ||
# Building Hello-IT | ||
|
||
To prepare a new Hello-IT release, some steps must be followed in a specific order. | ||
|
||
## Preparation | ||
|
||
General code submission follows the git flow pattern. | ||
|
||
Once `develop` branch is ready for a new version, a new `release` branch named with the version number only (no `v` first). | ||
|
||
## Building the release | ||
|
||
To build the release once in the release branch, use the `BuildAndPackage.command` script. | ||
|
||
By default, build script will look for the Developer ID Installer named `Developer ID Installer: Yoann GINI (CRXPBZF3N4)`. Use `CUSTOM_DEVELOPER_ID_INSTALLER` environmental variable to specify your own. | ||
|
||
The script will build the app with all dependencies in the right order, sign it, create the package, and sign it too. | ||
|
||
The script will build the app in `Release` config when the current branch is under `release` or is `master`. All other branches will be built in `Debug` config. | ||
|
||
App version will be grabbed from git branches name or let untouched if the branch name does not match the pattern `release/version`. If version number is updated, it will automatically be committed before building the release. | ||
|
||
Build version is generated from the number of git commits in the history from the current branch point of view. | ||
|
||
Once built and tested, and only for final release (not for beta), the release branch must be merged in the master tree. Last commit to merge should be the one updating the app version. Returning to this exact commit will allow a developer to recreate the app in the exact same states (and so build version will be the same). | ||
|
||
The build will deny to start if there is some uncommitted change to the repo. | ||
|
||
## Distribution | ||
|
||
The pkg created at the previous step can now be updated into the Github Release system with a nice description and the pkg as the only payload. |
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
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
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
95 changes: 95 additions & 0 deletions
95
src/Plugins/ScriptedItem/CustomScripts/com.github.ygini.hello-it.public-ip.sh
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,95 @@ | ||
#!/bin/bash | ||
|
||
# Display Public IP address as title | ||
# With no option, the script detect the public | ||
# address using https://ip.abelionni.com/script/ | ||
# | ||
# You can specify the test URL using -u | ||
# | ||
# You can specify the behavior if no IP | ||
# are found with -m option: | ||
# 0: show IP if available, hide if not | ||
# 1: show IP if available, specify if not, no $STATE | ||
# 2: show IP if available, specify if not, use $STATE | ||
|
||
. "$HELLO_IT_SCRIPT_FOLDER/com.github.ygini.hello-it.scriptlib.sh" | ||
|
||
mode=0 | ||
public_ip_url="https://ip.abelionni.com/script/" | ||
|
||
while getopts "m:u:" o; do | ||
case "${o}" in | ||
m) | ||
mode=${OPTARG} | ||
;; | ||
u) | ||
public_ip_url=${OPTARG} | ||
;; | ||
esac | ||
done | ||
|
||
function handleStateUpdate { | ||
mode=$1 | ||
requestedState=$2 | ||
|
||
if [ $mode -eq 0 ] | ||
then | ||
if [ "$requestedState" == ${STATE[0]} ] | ||
then | ||
setHidden NO | ||
else | ||
setHidden YES | ||
fi | ||
else | ||
setHidden NO | ||
if [ $mode -eq 1 ] | ||
then | ||
updateState ${STATE[4]} | ||
else | ||
updateState $requestedState | ||
fi | ||
fi | ||
} | ||
|
||
function getIP { | ||
curl -s "$public_ip_url" | ||
} | ||
|
||
function updateTitleWithArgs { | ||
ipAddress=$(curl -s "$public_ip_url") | ||
|
||
if [ -z "$ipAddress" ] | ||
then | ||
updateTitle "No IP Address" | ||
if [[ "$HELLO_IT_NETWORK_STATE" == "1" ]] | ||
then | ||
handleStateUpdate $mode ${STATE[2]} | ||
updateTooltip "Please, check your Ethernet or WiFi connection" | ||
else | ||
handleStateUpdate $mode ${STATE[3]} | ||
updateTooltip "No internet connection available" | ||
fi | ||
else | ||
updateTitle "Public IP: $ipAddress" | ||
handleStateUpdate $mode ${STATE[0]} | ||
updateTooltip "You should have access to Internet" | ||
fi | ||
|
||
} | ||
|
||
function onClickAction { | ||
updateTitleWithArgs "$@" | ||
getIP "$@" | pbcopy | ||
} | ||
|
||
function fromCronAction { | ||
updateTitleWithArgs "$@" | ||
} | ||
|
||
function setTitleAction { | ||
updateTitleWithArgs "$@" | ||
} | ||
|
||
main "$@" | ||
|
||
exit 0 |
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
Oops, something went wrong.