forked from joseph/gitea_CICD
update env source
This commit is contained in:
parent
971929ac29
commit
82d6753b3c
|
|
@ -13,16 +13,6 @@ cd "$PROJECT_PATH" &&
|
|||
git config --global --add safe.directory $PROJECT_PATH &&
|
||||
SET_ORIGIN=$(git remote set-url origin $REPOSITORY_AUTH) &&
|
||||
|
||||
if git ls-remote -q --exit-code "$REPOSITORY_AUTH" > /dev/null; then
|
||||
echo -e "\e[32mOK: Repository $GIT_REPOSITORY exists\e[0m"
|
||||
sleep 1
|
||||
else
|
||||
echo ""
|
||||
echo -e "\e[41mError: Repository $GIT_REPOSITORY not exists.\e[0m"
|
||||
echo ""
|
||||
exit 1
|
||||
fi
|
||||
|
||||
# Kiểm tra xem Node.js đã cài đặt chưa
|
||||
if ! command -v node &> /dev/null; then
|
||||
echo -e "\e[31mNode.js is not installed.\e[0m"
|
||||
|
|
@ -44,6 +34,16 @@ else
|
|||
npm -v
|
||||
fi
|
||||
|
||||
if git ls-remote -q --exit-code "$REPOSITORY_AUTH" > /dev/null; then
|
||||
echo -e "\e[32mOK: Repository $GIT_REPOSITORY exists\e[0m"
|
||||
sleep 1
|
||||
else
|
||||
echo ""
|
||||
echo -e "\e[41mError: Repository $GIT_REPOSITORY not exists.\e[0m"
|
||||
echo ""
|
||||
exit 1
|
||||
fi
|
||||
|
||||
# Kiểm tra xem tệp index.js có tồn tại không
|
||||
if [ -f "$indexjs_path" ]; then
|
||||
echo "Run file $indexjs_path..."
|
||||
|
|
|
|||
Loading…
Reference in New Issue