fix: pull repositories from their current branch instead of master
This commit is contained in:
parent
84ceb52088
commit
d102f18f91
3 changed files with 8 additions and 3 deletions
|
@ -27,12 +27,16 @@ let corsOptions = {
|
|||
return callback(null, true);
|
||||
}
|
||||
// disallow requests with no origin
|
||||
if (!origin) return callback(new Error('Not allowed by CORS'), false);
|
||||
if (!origin) {
|
||||
logger.error('No origin');
|
||||
return callback(new Error('Not allowed by CORS'), false);
|
||||
}
|
||||
|
||||
if (getConfig().clientUrls.includes(origin)) {
|
||||
return callback(null, true);
|
||||
}
|
||||
|
||||
logger.error(`Origin ${origin} not allowed by CORS`);
|
||||
const message = "The CORS policy for this origin doesn't allow access from the particular origin.";
|
||||
return callback(new Error(message), false);
|
||||
},
|
||||
|
@ -103,6 +107,7 @@ const main = async () => {
|
|||
// Start apps
|
||||
appsService.startAllApps();
|
||||
logger.info(`Server running on port ${port} 🚀 Production => ${__prod__}`);
|
||||
logger.info(`Config: ${JSON.stringify(getConfig(), null, 2)}`);
|
||||
});
|
||||
} catch (error) {
|
||||
logger.error(error);
|
||||
|
|
|
@ -55,7 +55,7 @@ if [[ "$command" = "update" ]]; then
|
|||
write_log "Updating ${repo} in ${repo_hash}"
|
||||
cd "${repo_dir}" || exit
|
||||
|
||||
if ! git pull origin master; then
|
||||
if ! git pull origin "$(git rev-parse --abbrev-ref HEAD)"; then
|
||||
cd "${ROOT_FOLDER}" || exit
|
||||
write_log "Failed to update repo"
|
||||
exit 1
|
||||
|
|
|
@ -27,7 +27,7 @@ if [[ "$command" = "update" ]]; then
|
|||
|
||||
scripts/stop.sh
|
||||
git config --global --add safe.directory "${ROOT_FOLDER}"
|
||||
git pull origin master
|
||||
git pull origin "$(git rev-parse --abbrev-ref HEAD)"
|
||||
scripts/start.sh
|
||||
exit
|
||||
fi
|
||||
|
|
Loading…
Reference in a new issue