Last active
February 12, 2021 12:58
-
-
Save hbouhadji/92e84e68e7d6145e7ad3d67c199add77 to your computer and use it in GitHub Desktop.
Fill environment properties on beanstalk from .env file
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
// example in the body | |
// paste it in the chrome console | |
let raw = ` | |
APP_NAME=Laravel | |
APP_ENV=local | |
`; | |
raw = raw.split('\n').filter(str => str.length > 0 && str[0] != '#') | |
raw.forEach(keyValue => { | |
keyValue = keyValue.split('='); | |
let last = $('table.properties-table').find('tr[class="ng-scope"]').last(); | |
let keyInput = last.find('input')[0]; | |
let valueInput = last.find('input')[1]; | |
keyInput.value = keyValue[0]; | |
valueInput.value = keyValue[1]; | |
angular.element(keyInput).triggerHandler('change'); | |
angular.element(valueInput).triggerHandler('change'); | |
}) | |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment