This file contains hidden or 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
async function onIdentify(event, settings) { | |
let response; | |
try { | |
const profileApiResponse = await fetch( | |
`https://profiles.segment.com/v1/spaces/${ | |
event.context.personas.space_id | |
}/collections/users/profiles/user_id:${encodeURIComponent( | |
event.userId | |
)}/traits`, | |
{ |
This file contains hidden or 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
async function onIdentify(event, settings) { | |
let response; | |
try { | |
const profileApiResponse = await fetch( | |
`https://profiles.segment.com/v1/spaces/${ | |
event.context.personas.space_id | |
}/collections/users/profiles/user_id:${encodeURIComponent( | |
event.userId | |
)}/traits`, |
This file contains hidden or 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
TODO: Adapt namespace and host of API rule | |
--- | |
apiVersion: apps/v1 | |
kind: Deployment | |
metadata: | |
name: content-type-converter | |
namespace: content-type-converter | |
labels: | |
app: content-type-converter |
This file contains hidden or 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
_schema-version: 2.0.0 | |
ID: bookshop | |
version: 1.0.0 | |
parameters: | |
enable-parallel-deployments: true | |
modules: | |
- name: bookshop-db | |
type: hdb | |
path: db |
This file contains hidden or 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
#!/bin/sh | |
# | |
# An example hook script to verify what is about to be committed. | |
# Called by "git commit" with no arguments. The hook should | |
# exit with non-zero status after issuing an appropriate message if | |
# it wants to stop the commit. | |
# | |
# To enable this hook, rename this file to "pre-commit". | |
new_version=`cat package.json | grep version | head -1 | awk -F: '{ print $2 }' | sed 's/[\",]//g' | tr -d '[[:space:]]'` |
This file contains hidden or 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
function checkCfStatus () { | |
if echo $(cf a 2>&1 >/dev/null) | grep -q 'The token expired\|Not logged in' $OUTPUT; then | |
cf login | |
fi | |
} | |
function preexecHook () { | |
if echo $1 | grep -q "cf "; then | |
checkCfStatus | |
fi |