Skip to content

Instantly share code, notes, and snippets.

View AwolDes's full-sized avatar
🛠️
Building

Austin AwolDes

🛠️
Building
View GitHub Profile
<div contenteditable="true" role="textbox" translate="no" class="tiptap ProseMirror trix-content" tabindex="0" slot="editor"><div class="attachment-gallery is-empty" data-placeholder="Write something..."><figure class="
attachment
attachment--preview
attachment--png
" attachment-type="previewable-attachment-figure" sgid="eyJfcmFpbHMiOnsiZGF0YSI6ImdpZDovL3dlYi9BY3RpdmVTdG9yYWdlOjpCbG9iLzE2MjEwMj9leHBpcmVzX2luIiwicHVyIjoiYXR0YWNoYWJsZSJ9fQ==--1637d09ceb0beff4cd5a8d490e6d6d65ccb915d5" data-trix-content-type="image/png" data-trix-attachment="{&quot;contentType&quot;:&quot;image/png&quot;,&quot;content&quot;:&quot;&quot;,&quot;filename&quot;:&quot;cyberpunk-ai.png&quot;,&quot;filesize&quot;:794943,&quot;alt&quot;:&quot;&quot;,&quot;height&quot;:800,&quot;width&quot;:800,&quot;sgid&quot;:&quot;eyJfcmFpbHMiOnsiZGF0YSI6ImdpZDovL3dlYi9BY3RpdmVTdG9yYWdlOjpCbG9iLzE2MjEwMj9leHBpcmVzX2luIiwicHVyIjoiYXR0YWNoYWJsZSJ9fQ==--1637d09ceb0beff4cd5a8d490e6d6d65ccb915d5&quot;,&quot;url&quot;:&quot;http
branches:
only:
- master
- staging
cache:
directories:
- node_modules
before_install: "./build-env.sh"
script:
- npm install
FILE="./.env"
if [[ $TRAVIS_BRANCH == 'staging' ]]; then
cat <<EOM >$FILE
REACT_APP_SOME_SERVICE=https://1111.execute-api.ap-southeast-2.amazonaws.com/dev
REACT_APP_OTHER_SERVICE=https://2222.execute-api.ap-southeast-2.amazonaws.com/dev
EOM
echo "=========== $TRAVIS_BRANCH ENV ==========="
cat $FILE
elif [[ $TRAVIS_BRANCH == 'master' ]]; then
@AwolDes
AwolDes / populate_env.sh
Created November 19, 2017 23:29
Deploying Create React App with Travis CI - Multiple stages with different environment variables. I could not find a better way to do this, so I thought I'd publish my solution.
FILE="./.env"
if [[ $TRAVIS_BRANCH == 'staging' ]]; then
cat <<EOM >$FILE
REACT_APP_API_URL=https://staging-api.app.com
EOM
echo "=========== ENV ==========="
cat $FILE
elif [[ $TRAVIS_BRANCH == 'master' ]]; then
cat <<EOM >$FILE
Installing collected packages: cryptography, pyOpenSSL, ndg-httpsclient
Running setup.py install for cryptography ... error
Complete output from command /usr/bin/python -u -c "import setuptools, tokenize;__file__='/tmp/pip-build-_ZEQuk/cryptography/setup.py';exec(compile(getattr(tokenize, 'open', open)(__file__).read().replace('\r\n', '\n'), __file__, 'exec'))" install --record /tmp/pip-HsQUUa-record/install-record.txt --single-version-externally-managed --compile:
Traceback (most recent call last):
File "<string>", line 1, in <module>
File "/tmp/pip-build-_ZEQuk/cryptography/setup.py", line 334, in <module>
**keywords_with_side_effects(sys.argv)
File "/usr/lib/python2.7/distutils/core.py", line 111, in setup
_setup_distribution = dist = klass(attrs)
File "/home/austin/.local/lib/python2.7/site-packages/setuptools/dist.py", line 318, in __init__
.app{
margin-left:25%;
}
.done-true {
text-decoration: line-through;
color: grey;
}
[data-toggle='on'] {
{
"people":[
{
"id": 1,
"name":"",
"surname":"",
"number":""
},