pull/173/head^2
parent
b46acd7f63
commit
0c65daaa7d
@ -0,0 +1,7 @@
|
||||
#!/bin/bash
|
||||
|
||||
# uninstall first in case this is an upgrade
|
||||
/usr/local/bin/cloudflared service uninstall
|
||||
|
||||
# install the new service using launchctl
|
||||
/usr/local/bin/cloudflared service install
|
@ -0,0 +1,5 @@
|
||||
#!/bin/bash
|
||||
|
||||
/usr/local/bin/cloudflared service uninstall
|
||||
rm /usr/local/bin/cloudflared
|
||||
pkgutil --forget com.cloudflare.cloudflared
|
@ -0,0 +1,31 @@
|
||||
#!/bin/bash
|
||||
|
||||
TARGET_DIRECTORY=".build"
|
||||
BINARY_NAME="cloudflared"
|
||||
VERSION=$(git describe --tags --always --dirty="-dev")
|
||||
PRODUCT="cloudflared"
|
||||
|
||||
|
||||
echo "building cloudflared"
|
||||
make cloudflared
|
||||
|
||||
echo "creating build directory"
|
||||
mkdir ${TARGET_DIRECTORY}
|
||||
mkdir ${TARGET_DIRECTORY}/contents
|
||||
cp -r .mac_resources/scripts ${TARGET_DIRECTORY}/scripts
|
||||
|
||||
echo "move cloudflared into the build directory"
|
||||
mv $BINARY_NAME {$TARGET_DIRECTORY}/contents/${PRODUCT}
|
||||
|
||||
echo "build the installer package"
|
||||
pkgbuild --identifier com.cloudflare.${PRODUCT} \
|
||||
--version ${VERSION} \
|
||||
--scripts ${TARGET_DIRECTORY}/scripts \
|
||||
--root ${TARGET_DIRECTORY}/contents \
|
||||
--install-location /usr/local/bin \
|
||||
${PRODUCT}.pkg
|
||||
# TODO: our iOS/Mac account doesn't have this installer certificate type.
|
||||
# need to find how we can get it --sign "Developer ID Installer: Cloudflare" \
|
||||
|
||||
echo "cleaning up the build directory"
|
||||
rm -rf $TARGET_DIRECTORY
|
@ -0,0 +1,45 @@
|
||||
{
|
||||
"product": "cloudflared",
|
||||
"company": "cloudflare",
|
||||
"license": "LICENSE",
|
||||
"upgrade-code": "23f90fdd-9328-47ea-ab52-5380855a4b12",
|
||||
"files": {
|
||||
"guid": "35e5e858-9372-4449-bf73-1cd6f7267128",
|
||||
"items": [
|
||||
"cloudflared.exe"
|
||||
]
|
||||
},
|
||||
"env": {
|
||||
"guid": "6bb74449-d10d-4f4a-933e-6fc9fa006eae",
|
||||
"vars": [
|
||||
{
|
||||
"name": "CFDPATH",
|
||||
"value": "[INSTALLDIR].",
|
||||
"permanent": "no",
|
||||
"system": "yes",
|
||||
"action": "set",
|
||||
"part": "all"
|
||||
}
|
||||
]
|
||||
},
|
||||
"shortcuts": {},
|
||||
"choco": {
|
||||
"description": "cloudflared connects your machine or user identity to Cloudflare's global network.",
|
||||
"project-url": "https://github.com/cloudflare/cloudflared",
|
||||
"license-url": "https://github.com/cloudflare/cloudflared/blob/master/LICENSE"
|
||||
},
|
||||
"hooks": [
|
||||
{
|
||||
"command": "sc.exe create Cloudflared binPath=\"[INSTALLDIR]cloudflared.exe\" type=share start=auto DisplayName=\"Cloudflared\"",
|
||||
"when": "install"
|
||||
},
|
||||
{
|
||||
"command": "sc.exe start Cloudflared",
|
||||
"when": "install"
|
||||
},
|
||||
{
|
||||
"command": "sc.exe delete Cloudflared",
|
||||
"when": "uninstall"
|
||||
}
|
||||
]
|
||||
}
|
Loading…
Reference in new issue