Skip to content

Commit

Permalink
Hotfix: Try to fix the weird devspace issue
Browse files Browse the repository at this point in the history
Some users reported that the non-devspace code(some of which was bannable) was being executed in devspace despite the checks

We've moved to eq and ne instead of comparing with == and !=
  • Loading branch information
sounddrill31 authored Sep 2, 2024
1 parent 1ce9493 commit 210f053
Show file tree
Hide file tree
Showing 7 changed files with 19 additions and 19 deletions.
2 changes: 1 addition & 1 deletion .github/workflows/configure-runner.yml
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,7 @@ jobs:
# Download and configure 'crave'.
- name: Configure the 'crave' environment
run: |
if [ "${DCDEVSPACE}" == "1" ]; then
if [ "${DCDEVSPACE}" -eq 1 ]; then
echo 'No need to set up crave, we are already running in devspace!'
else
mkdir ${HOME}/bin/
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/force-restart-runner.yml
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@ jobs:
# Download and configure 'crave'.
- name: Configure the 'crave' environment
run: |
if [ "${DCDEVSPACE}" == "1" ]; then
if [ "${DCDEVSPACE}" -eq 1 ]; then
echo 'No need to set up crave, we are already running in devspace!'
else
mkdir ${HOME}/bin/
Expand Down
6 changes: 3 additions & 3 deletions .github/workflows/main.yml
Original file line number Diff line number Diff line change
Expand Up @@ -302,13 +302,13 @@ jobs:
else
echo "We are already running in devspace... Skipping Symlinks"
fi
if grep -q "$PROJECTFOLDER" <(crave clone list --json | jq -r '.clones[]."Cloned At"') && [ "${DCDEVSPACE}" == "1" ]; then
if grep -q "$PROJECTFOLDER" <(crave clone list --json | jq -r '.clones[]."Cloned At"') && [ "${DCDEVSPACE}" -eq 1 ]; then
crave clone destroy -y $PROJECTFOLDER || echo "Error removing $PROJECTFOLDER"
else
echo "Skipping removal"
fi
if [ "${DCDEVSPACE}" == "1" ]; then
if [ "${DCDEVSPACE}" -eq 1 ]; then
crave clone create --projectID $PROJECTID $PROJECTFOLDER || echo "Crave clone create failed!"
else
mkdir $PROJECTFOLDER
Expand Down Expand Up @@ -375,7 +375,7 @@ jobs:
- name: Configure the 'crave' environment
run: |
mkdir -p $PROJECTFOLDER/.repo/manifests
if [ "${DCDEVSPACE}" == "1" ]; then
if [ "${DCDEVSPACE}" -eq 1 ]; then
echo 'No need to set up crave, we are already running in devspace!'
else
curl -s https://raw.githubusercontent.com/accupara/crave/master/get_crave.sh | bash -s --
Expand Down
14 changes: 7 additions & 7 deletions .github/workflows/selfhosted.yml
Original file line number Diff line number Diff line change
Expand Up @@ -87,7 +87,7 @@ jobs:
# Download and configure 'crave'.
- name: Configure the 'crave' environment
run: |
if [ "${DCDEVSPACE}" == "1" ]; then
if [ "${DCDEVSPACE}" -eq 1 ]; then
echo 'No need to set up crave, we are already running in devspace!'
else
mkdir ${HOME}/bin/
Expand Down Expand Up @@ -351,7 +351,7 @@ jobs:
# Create a project folder
- name: Create Project Folders
run: |
if [ "${DCDEVSPACE}" != "1" ]; then
if [ "${DCDEVSPACE}" -ne 1 ]; then
echo "Symlinking devspace folder"
mkdir -p devspace
sudo mkdir -p /crave-devspaces
Expand All @@ -360,13 +360,13 @@ jobs:
else
echo "We are already running in devspace... Skipping Symlinks"
fi
if grep -q "$PROJECTFOLDER" <(crave clone list --json | jq -r '.clones[]."Cloned At"') && [ "${DCDEVSPACE}" == "1" ]; then
if grep -q "$PROJECTFOLDER" <(crave clone list --json | jq -r '.clones[]."Cloned At"') && [ "${DCDEVSPACE}" -eq 1 ]; then
crave clone destroy -y $PROJECTFOLDER || echo "Error removing $PROJECTFOLDER"
else
echo "Skipping removal"
fi
if [ "${DCDEVSPACE}" == "1" ]; then
if [ "${DCDEVSPACE}" -eq 1 ]; then
crave clone create --projectID $PROJECTID $PROJECTFOLDER || echo "Crave clone create failed!"
else
mkdir $PROJECTFOLDER
Expand Down Expand Up @@ -394,7 +394,7 @@ jobs:
- name: Configure the 'crave' environment
run: |
mkdir -p $PROJECTFOLDER/.repo/manifests
if [ "${DCDEVSPACE}" == "1" ]; then
if [ "${DCDEVSPACE}" -eq 1 ]; then
echo 'No need to set up crave, we are already running in devspace!'
else
curl -s https://raw.githubusercontent.com/accupara/crave/master/get_crave.sh | bash -s --
Expand All @@ -420,7 +420,7 @@ jobs:
- name: Set the 'crave' project
run: |
cd $PROJECTFOLDER
if grep -q "$PROJECTFOLDER" <(crave clone list --json | jq -r '.clones[]."Cloned At"') && [ "${DCDEVSPACE}" == "1" ]; then
if grep -q "$PROJECTFOLDER" <(crave clone list --json | jq -r '.clones[]."Cloned At"') && [ "${DCDEVSPACE}" -eq 1 ]; then
echo "Using Crave Clone... skipping"
else
echo "Running $REPO_INIT"
Expand Down Expand Up @@ -562,7 +562,7 @@ jobs:
- name: Destroy Crave Clone
if: ${{ always() }}
run: |
if grep -q "$PROJECTFOLDER" <(crave clone list --json | jq -r '.clones[]."Cloned At"') && [ "${DCDEVSPACE}" == "1" ]; then
if grep -q "$PROJECTFOLDER" <(crave clone list --json | jq -r '.clones[]."Cloned At"') && [ "${DCDEVSPACE}" -eq 1 ]; then
crave clone destroy -y $PROJECTFOLDER || echo "Error removing $PROJECTFOLDER"
else
echo "Skipping removal"
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/start-vscode.obsolete
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@ jobs:
# Download and configure 'crave'.
- name: Configure the 'crave' environment
run: |
if [ "${DCDEVSPACE}" == "1" ]; then
if [ "${DCDEVSPACE}" -eq 1 ]; then
echo 'No need to set up crave, we are already running in devspace!'
else
mkdir ${HOME}/bin/
Expand Down
6 changes: 3 additions & 3 deletions .github/workflows/twrp-legacy.yml
Original file line number Diff line number Diff line change
Expand Up @@ -229,13 +229,13 @@ jobs:
else
echo "We are already running in devspace... Skipping Symlinks"
fi
if grep -q "$PROJECTFOLDER" <(crave clone list --json | jq -r '.clones[]."Cloned At"') && [ "${DCDEVSPACE}" == "1" ]; then
if grep -q "$PROJECTFOLDER" <(crave clone list --json | jq -r '.clones[]."Cloned At"') && [ "${DCDEVSPACE}" -eq 1 ]; then
crave clone destroy -y $PROJECTFOLDER || echo "Error removing $PROJECTFOLDER"
else
echo "Skipping removal"
fi
if [ "${DCDEVSPACE}" == "1" ]; then
if [ "${DCDEVSPACE}" -eq 1 ]; then
crave clone create --projectID $PROJECTID $PROJECTFOLDER || echo "Crave clone create failed!"
else
mkdir $PROJECTFOLDER
Expand Down Expand Up @@ -302,7 +302,7 @@ jobs:
- name: Configure the 'crave' environment
run: |
mkdir -p $PROJECTFOLDER/.repo/manifests
if [ "${DCDEVSPACE}" == "1" ]; then
if [ "${DCDEVSPACE}" -eq 1 ]; then
echo 'No need to set up crave, we are already running in devspace!'
else
curl -s https://raw.githubusercontent.com/accupara/crave/master/get_crave.sh | bash -s --
Expand Down
6 changes: 3 additions & 3 deletions .github/workflows/twrp.yml
Original file line number Diff line number Diff line change
Expand Up @@ -229,13 +229,13 @@ jobs:
else
echo "We are already running in devspace... Skipping Symlinks"
fi
if grep -q "$PROJECTFOLDER" <(crave clone list --json | jq -r '.clones[]."Cloned At"') && [ "${DCDEVSPACE}" == "1" ]; then
if grep -q "$PROJECTFOLDER" <(crave clone list --json | jq -r '.clones[]."Cloned At"') && [ "${DCDEVSPACE}" -eq 1 ]; then
crave clone destroy -y $PROJECTFOLDER || echo "Error removing $PROJECTFOLDER"
else
echo "Skipping removal"
fi
if [ "${DCDEVSPACE}" == "1" ]; then
if [ "${DCDEVSPACE}" -eq 1 ]; then
crave clone create --projectID $PROJECTID $PROJECTFOLDER || echo "Crave clone create failed!"
else
mkdir $PROJECTFOLDER
Expand Down Expand Up @@ -302,7 +302,7 @@ jobs:
- name: Configure the 'crave' environment
run: |
mkdir -p $PROJECTFOLDER/.repo/manifests
if [ "${DCDEVSPACE}" == "1" ]; then
if [ "${DCDEVSPACE}" -eq 1 ]; then
echo 'No need to set up crave, we are already running in devspace!'
else
curl -s https://raw.githubusercontent.com/accupara/crave/master/get_crave.sh | bash -s --
Expand Down

0 comments on commit 210f053

Please sign in to comment.