-
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
30 changed files
with
735 additions
and
128 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,9 @@ | ||
## icanhazdadjoke | ||
--- | ||
##### Author: [Zack McCauley](https://www.github.com/wardsparadox) | ||
|
||
### Description: | ||
Curls on click icanhazdadjoke.com's API for a fun joke | ||
Would recommend using the optionalDisplay:true keys to hide it | ||
|
||
### Preference Keys |
24 changes: 24 additions & 0 deletions
24
...EasterEggs/icanhazdadjokes/com.github.wardsparadox.hello-it.eastereggs.icanhazdadjokes.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,24 @@ | ||
#!/bin/bash | ||
# Pending Updates Script for Managed Software Center | ||
### The following line load the Hello IT bash script lib | ||
. "$HELLO_IT_SCRIPT_SH_LIBRARY/com.github.ygini.hello-it.scriptlib.sh" | ||
|
||
function displayJoke { | ||
osascript -e "display dialog \"$(curl -s -H "User-Agent: HelloIT" -H "Accept: text/plain" https://icanhazdadjoke.com/)\" buttons {\"Haha\"} with icon POSIX file \"/System/Library/CoreServices/CoreTypes.bundle/Contents/Resources/ErasingIcon.icns\"" | ||
} | ||
|
||
|
||
function onClickAction { | ||
displayJoke | ||
} | ||
|
||
function setTitleAction { | ||
updateTitle "Would you like to see a joke?" | ||
updateState "${STATE[4]}" | ||
updateTooltip "Brought to you by icanhazdadjoke.com" | ||
} | ||
|
||
### The only things to do outside of a bash function is to call the main function defined by the Hello IT bash lib. | ||
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
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 |
---|---|---|
|
@@ -3,7 +3,9 @@ | |
CONFIGURATION="Release" | ||
|
||
DEFAULT_DEVELOPER_ID_INSTALLER="Developer ID Installer: Yoann GINI (CRXPBZF3N4)" | ||
DEFAULT_DEVELOPER_ID_APP="Developer ID Application: Yoann GINI (CRXPBZF3N4)" | ||
DEVELOPER_ID_INSTALLER=${CUSTOM_DEVELOPER_ID_INSTALLER:-${DEFAULT_DEVELOPER_ID_INSTALLER}} | ||
DEVELOPER_ID_APP=${CUSTOM_DEVELOPER_ID_APP:-${DEFAULT_DEVELOPER_ID_APP}} | ||
|
||
NOTARIZATION_DEFAULT_DEVELOPER_ID_LOGIN="[email protected]" | ||
NOTARIZATION_DEVELOPER_ID_LOGIN=${NOTARIZATION_CUSTOM_DEVELOPER_ID_LOGIN:-${NOTARIZATION_DEFAULT_DEVELOPER_ID_LOGIN}} | ||
|
@@ -185,6 +187,12 @@ RELEASE_DSYM_LOCATION="${RELEASE_LOCATION}/dSYM" | |
|
||
PKG_ROOT="$(mktemp -d)" | ||
|
||
if [[ -d "${RELEASE_LOCATION}" ]] | ||
then | ||
echo "Previous build found, cleaning all related files" | ||
rm -rf "${RELEASE_LOCATION}" | ||
fi | ||
|
||
mkdir -p "${BUILT_PRODUCTS_DIR}/dSYM" | ||
mkdir -p "${BUILT_PRODUCTS_DIR}/Products" | ||
mkdir -p "${RELEASE_PRODUCT_LOCATION}" | ||
|
@@ -200,25 +208,32 @@ echo "### Start building Hello IT" | |
|
||
xcodebuild -UseModernBuildSystem=NO -quiet -project "${PROJECT_DIR}/Hello IT.xcodeproj" -configuration ${CONFIGURATION} -target "Hello IT" CONFIGURATION_TEMP_DIR="${BUILT_PRODUCTS_DIR}/Intermediates" CONFIGURATION_BUILD_DIR="${BUILT_PRODUCTS_DIR}/Products" DWARF_DSYM_FOLDER_PATH="${BUILT_PRODUCTS_DIR}/dSYM" OTHER_CODE_SIGN_FLAGS="--timestamp" | ||
|
||
cp -r "${BUILT_PRODUCTS_DIR}/Products/Hello IT.app" "${RELEASE_PRODUCT_LOCATION}" | ||
if [[ $? != 0 ]]; then | ||
echo "Building failed" | ||
exit 1 | ||
fi | ||
|
||
cp -a "${BUILT_PRODUCTS_DIR}/Products/Hello IT.app" "${RELEASE_PRODUCT_LOCATION}" | ||
|
||
codesign --deep --force --verbose --timestamp --options runtime --sign "${DEVELOPER_ID_APP}" "${RELEASE_PRODUCT_LOCATION}/Hello IT.app" | ||
|
||
echo "" | ||
echo "" | ||
|
||
|
||
cp -r "${BUILT_PRODUCTS_DIR}/dSYM" "${RELEASE_DSYM_LOCATION}" | ||
cp -a "${BUILT_PRODUCTS_DIR}/dSYM" "${RELEASE_DSYM_LOCATION}" | ||
|
||
echo "####### Create package from build" | ||
|
||
mkdir -p "${PKG_ROOT}//Applications/Utilities" | ||
cp -r "${RELEASE_PRODUCT_LOCATION}/Hello IT.app" "${PKG_ROOT}/Applications/Utilities" | ||
cp -a "${RELEASE_PRODUCT_LOCATION}/Hello IT.app" "${PKG_ROOT}/Applications/Utilities" | ||
|
||
mkdir -p "${PKG_ROOT}/Library/Application Support/com.github.ygini.hello-it/CustomImageForItem" | ||
mkdir -p "${PKG_ROOT}/Library/Application Support/com.github.ygini.hello-it/CustomStatusBarIcon" | ||
cp -r "${PROJECT_DIR}/Plugins/ScriptedItem/CustomScripts" "${PKG_ROOT}/Library/Application Support/com.github.ygini.hello-it" | ||
cp -a "${PROJECT_DIR}/Plugins/ScriptedItem/CustomScripts" "${PKG_ROOT}/Library/Application Support/com.github.ygini.hello-it" | ||
|
||
mkdir -p "${PKG_ROOT}/Library/LaunchAgents" | ||
cp -r "${GIT_ROOT_DIR}/package/LaunchAgents/com.github.ygini.hello-it.plist" "${PKG_ROOT}/Library/LaunchAgents" | ||
cp -a "${GIT_ROOT_DIR}/package/LaunchAgents/com.github.ygini.hello-it.plist" "${PKG_ROOT}/Library/LaunchAgents" | ||
|
||
#sudo chown -R root:wheel "${PKG_ROOT}" | ||
|
||
|
@@ -231,6 +246,11 @@ pkgbuild --component-plist "${PBK_BUILD_COMPONENT}" --sign "${DEVELOPER_ID_INSTA | |
|
||
productbuild --product "${GIT_ROOT_DIR}/package/requirements.plist" --sign "${DEVELOPER_ID_INSTALLER}" --version "${PKG_VERSION}" --package "${RELEASE_LOCATION}/Hello-IT-${PKG_VERSION}-${CONFIGURATION}.pkg" "${RELEASE_LOCATION}/Hello-IT-${PKG_VERSION}-${CONFIGURATION}-Distribution.pkg" | ||
|
||
if [[ $? != 0 ]]; then | ||
echo "Package creation failed" | ||
exit 1 | ||
fi | ||
|
||
rm "${RELEASE_LOCATION}/Hello-IT-${PKG_VERSION}-${CONFIGURATION}.pkg" | ||
|
||
notarizePayloadWithBundleID "${RELEASE_LOCATION}/Hello-IT-${PKG_VERSION}-${CONFIGURATION}-Distribution.pkg" "com.github.ygini.hello-it" | ||
|
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
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -45,6 +45,7 @@ | |
F8340B9F1C96CF9000C820D7 /* [email protected] in Resources */ = {isa = PBXBuildFile; fileRef = F8340B8B1C96CF9000C820D7 /* [email protected] */; }; | ||
F84238FF20C8748200FB5410 /* CachetHQComponent.hitp in Copy Default Plugins */ = {isa = PBXBuildFile; fileRef = F8D61B8A20C8731A00DE2453 /* CachetHQComponent.hitp */; settings = {ATTRIBUTES = (CodeSignOnCopy, RemoveHeadersOnCopy, ); }; }; | ||
F89B593B1DA7DC350028D75F /* Reachability.m in Sources */ = {isa = PBXBuildFile; fileRef = F89B593A1DA7DC350028D75F /* Reachability.m */; }; | ||
F8F07637244EEFA200E3DF7B /* Command.hitp in Copy Default Plugins */ = {isa = PBXBuildFile; fileRef = F89A03522368A51D0059281B /* Command.hitp */; settings = {ATTRIBUTES = (CodeSignOnCopy, RemoveHeadersOnCopy, ); }; }; | ||
/* End PBXBuildFile section */ | ||
|
||
/* Begin PBXContainerItemProxy section */ | ||
|
@@ -146,6 +147,20 @@ | |
remoteGlobalIDString = F83294A41F773076009DA574; | ||
remoteInfo = ADPass; | ||
}; | ||
F89A03512368A51D0059281B /* PBXContainerItemProxy */ = { | ||
isa = PBXContainerItemProxy; | ||
containerPortal = F89A034C2368A51C0059281B /* Command.xcodeproj */; | ||
proxyType = 2; | ||
remoteGlobalIDString = F89A03432368A51C0059281B; | ||
remoteInfo = Command; | ||
}; | ||
F8A258762452F66B00BB8A05 /* PBXContainerItemProxy */ = { | ||
isa = PBXContainerItemProxy; | ||
containerPortal = F89A034C2368A51C0059281B /* Command.xcodeproj */; | ||
proxyType = 1; | ||
remoteGlobalIDString = F89A03422368A51C0059281B; | ||
remoteInfo = Command; | ||
}; | ||
F8CF084221A729190070C049 /* PBXContainerItemProxy */ = { | ||
isa = PBXContainerItemProxy; | ||
containerPortal = F8D61B8520C8731A00DE2453 /* CachetHQ.xcodeproj */; | ||
|
@@ -232,6 +247,7 @@ | |
dstPath = ""; | ||
dstSubfolderSpec = 13; | ||
files = ( | ||
F8F07637244EEFA200E3DF7B /* Command.hitp in Copy Default Plugins */, | ||
F84238FF20C8748200FB5410 /* CachetHQComponent.hitp in Copy Default Plugins */, | ||
F83294DD1F7736B5009DA574 /* ADPass.hitp in Copy Default Plugins */, | ||
E14B67DA1B59110D00941A27 /* ScriptedItem.hitp in Copy Default Plugins */, | ||
|
@@ -302,6 +318,7 @@ | |
F8340B891C96CF9000C820D7 /* [email protected] */ = {isa = PBXFileReference; lastKnownFileType = image.png; path = "[email protected]"; sourceTree = "<group>"; }; | ||
F8340B8A1C96CF9000C820D7 /* statusbar.png */ = {isa = PBXFileReference; lastKnownFileType = image.png; path = statusbar.png; sourceTree = "<group>"; }; | ||
F8340B8B1C96CF9000C820D7 /* [email protected] */ = {isa = PBXFileReference; lastKnownFileType = image.png; path = "[email protected]"; sourceTree = "<group>"; }; | ||
F89A034C2368A51C0059281B /* Command.xcodeproj */ = {isa = PBXFileReference; lastKnownFileType = "wrapper.pb-project"; name = Command.xcodeproj; path = Command/Command.xcodeproj; sourceTree = "<group>"; }; | ||
F89B59391DA7DC350028D75F /* Reachability.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = Reachability.h; sourceTree = "<group>"; }; | ||
F89B593A1DA7DC350028D75F /* Reachability.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = Reachability.m; sourceTree = "<group>"; }; | ||
F8B315891FA6BB1400839784 /* fr */ = {isa = PBXFileReference; lastKnownFileType = text.plist.strings; name = fr; path = fr.lproj/MainMenu.strings; sourceTree = "<group>"; }; | ||
|
@@ -354,6 +371,7 @@ | |
E17743301B51E6E600A5B406 /* Plugins */ = { | ||
isa = PBXGroup; | ||
children = ( | ||
F89A034C2368A51C0059281B /* Command.xcodeproj */, | ||
F8D61B8520C8731A00DE2453 /* CachetHQ.xcodeproj */, | ||
F83294AE1F773076009DA574 /* ADPass.xcodeproj */, | ||
E17743591B51EA8500A5B406 /* OpenResource.xcodeproj */, | ||
|
@@ -516,6 +534,14 @@ | |
name = statusbar; | ||
sourceTree = "<group>"; | ||
}; | ||
F89A034D2368A51C0059281B /* Products */ = { | ||
isa = PBXGroup; | ||
children = ( | ||
F89A03522368A51D0059281B /* Command.hitp */, | ||
); | ||
name = Products; | ||
sourceTree = "<group>"; | ||
}; | ||
F8D61B8620C8731A00DE2453 /* Products */ = { | ||
isa = PBXGroup; | ||
children = ( | ||
|
@@ -543,6 +569,7 @@ | |
); | ||
dependencies = ( | ||
F8F4E5771F1A73CC004E8789 /* PBXTargetDependency */, | ||
F8A258772452F66B00BB8A05 /* PBXTargetDependency */, | ||
F842390220C8748800FB5410 /* PBXTargetDependency */, | ||
F86CCC0B1F790D250043CF55 /* PBXTargetDependency */, | ||
F8F4E5791F1A73CC004E8789 /* PBXTargetDependency */, | ||
|
@@ -623,6 +650,10 @@ | |
ProductGroup = F8D61B8620C8731A00DE2453 /* Products */; | ||
ProjectRef = F8D61B8520C8731A00DE2453 /* CachetHQ.xcodeproj */; | ||
}, | ||
{ | ||
ProductGroup = F89A034D2368A51C0059281B /* Products */; | ||
ProjectRef = F89A034C2368A51C0059281B /* Command.xcodeproj */; | ||
}, | ||
{ | ||
ProductGroup = E1B2C8EE1B59351B005A9936 /* Products */; | ||
ProjectRef = E1B2C8ED1B59351B005A9936 /* HITDevKit.xcodeproj */; | ||
|
@@ -746,6 +777,13 @@ | |
remoteRef = F83294B21F773078009DA574 /* PBXContainerItemProxy */; | ||
sourceTree = BUILT_PRODUCTS_DIR; | ||
}; | ||
F89A03522368A51D0059281B /* Command.hitp */ = { | ||
isa = PBXReferenceProxy; | ||
fileType = wrapper.cfbundle; | ||
path = Command.hitp; | ||
remoteRef = F89A03512368A51D0059281B /* PBXContainerItemProxy */; | ||
sourceTree = BUILT_PRODUCTS_DIR; | ||
}; | ||
F8CF084321A729190070C049 /* CachetHQIncidents.hitp */ = { | ||
isa = PBXReferenceProxy; | ||
fileType = wrapper.cfbundle; | ||
|
@@ -856,6 +894,11 @@ | |
name = ADPass; | ||
targetProxy = F86CCC0A1F790D250043CF55 /* PBXContainerItemProxy */; | ||
}; | ||
F8A258772452F66B00BB8A05 /* PBXTargetDependency */ = { | ||
isa = PBXTargetDependency; | ||
name = Command; | ||
targetProxy = F8A258762452F66B00BB8A05 /* PBXContainerItemProxy */; | ||
}; | ||
F8F4E5771F1A73CC004E8789 /* PBXTargetDependency */ = { | ||
isa = PBXTargetDependency; | ||
name = HITDevKit; | ||
|
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.