From 0435e799976bb37d28981b35bc2e519b4a619656 Mon Sep 17 00:00:00 2001 From: Alexandru Mahmoud Date: Wed, 8 Jan 2025 12:15:30 -0500 Subject: [PATCH] Scripts paths --- .github/workflows/create_endpoint.yaml | 6 +++++- .github/workflows/delete_endpoint.yaml | 6 +++++- hubsingest | 1 + install_hubsingest.sh | 4 ++-- .../hubsingest_create_endpoint.sh | 0 .../hubsingest_delete_endpoint.sh | 0 6 files changed, 13 insertions(+), 4 deletions(-) rename hubsingest_create_endpoint.sh => scripts/hubsingest_create_endpoint.sh (100%) rename hubsingest_delete_endpoint.sh => scripts/hubsingest_delete_endpoint.sh (100%) diff --git a/.github/workflows/create_endpoint.yaml b/.github/workflows/create_endpoint.yaml index cec38f0..bcf376f 100644 --- a/.github/workflows/create_endpoint.yaml +++ b/.github/workflows/create_endpoint.yaml @@ -12,6 +12,9 @@ on: required: true type: string +env: + BIOC_HUBSINGEST_PATH: "${{ github.workspace }}" + jobs: create-endpoint: runs-on: ubuntu-latest @@ -36,4 +39,5 @@ jobs: - name: Create endpoint run: | - ./hubsingest create_endpoint "${{ inputs.username }}" "${{ inputs.size }}" ${{ secrets[env.SECRET_NAME] }} + sudo bash install_hubsingest.sh + hubsingest create_endpoint "${{ inputs.username }}" "${{ inputs.size }}" ${{ secrets[env.SECRET_NAME] }} diff --git a/.github/workflows/delete_endpoint.yaml b/.github/workflows/delete_endpoint.yaml index 793977b..f147377 100644 --- a/.github/workflows/delete_endpoint.yaml +++ b/.github/workflows/delete_endpoint.yaml @@ -8,6 +8,9 @@ on: required: true type: string +env: + BIOC_HUBSINGEST_PATH: "${{ github.workspace }}" + jobs: delete-endpoint: runs-on: ubuntu-latest @@ -27,4 +30,5 @@ jobs: - name: Delete endpoint run: | - ./hubsingest delete_endpoint "${{ inputs.username }}" + sudo bash install_hubsingest.sh + hubsingest delete_endpoint "${{ inputs.username }}" diff --git a/hubsingest b/hubsingest index 1566d0b..c78c73d 100755 --- a/hubsingest +++ b/hubsingest @@ -1,4 +1,5 @@ #!/bin/bash +HUBSINGESTPATH=${BIOC_HUBSINGEST_PATH:-/usr/local/bin/hubsingest} case "$1" in create_endpoint) diff --git a/install_hubsingest.sh b/install_hubsingest.sh index 7c3ca0b..a0fec49 100644 --- a/install_hubsingest.sh +++ b/install_hubsingest.sh @@ -3,8 +3,8 @@ HUBSINGESTPATH=${BIOC_HUBSINGEST_PATH:-/usr/local/bin/hubsingest} mkdir -p $HUBSINGESTPATH curl -o $HUBSINGESTPATH/hubsingest https://raw.githubusercontent.com/Bioconductor/hubsingest/refs/heads/devel/hubsingest -curl -o $HUBSINGESTPATH/hubsingest_create_endpoint.sh https://raw.githubusercontent.com/Bioconductor/hubsingest/refs/heads/devel/hubsingest_create_endpoint.sh -curl -o $HUBSINGESTPATH/hubsingest_delete_endpoint.sh https://raw.githubusercontent.com/Bioconductor/hubsingest/refs/heads/devel/hubsingest_delete_endpoint.sh +curl -o $HUBSINGESTPATH/hubsingest_create_endpoint.sh https://raw.githubusercontent.com/Bioconductor/hubsingest/refs/heads/devel/scripts/hubsingest_create_endpoint.sh +curl -o $HUBSINGESTPATH/hubsingest_delete_endpoint.sh https://raw.githubusercontent.com/Bioconductor/hubsingest/refs/heads/devel/scripts/hubsingest_delete_endpoint.sh chmod +x $HUBSINGESTPATH/hubsingest echo 'In order to persist the path, you may want to run, and/or add to your `rc` files:' diff --git a/hubsingest_create_endpoint.sh b/scripts/hubsingest_create_endpoint.sh similarity index 100% rename from hubsingest_create_endpoint.sh rename to scripts/hubsingest_create_endpoint.sh diff --git a/hubsingest_delete_endpoint.sh b/scripts/hubsingest_delete_endpoint.sh similarity index 100% rename from hubsingest_delete_endpoint.sh rename to scripts/hubsingest_delete_endpoint.sh