Browse Source

formatting

Matthew R. Kasun 3 years ago
parent
commit
d4d5bd350a
1 changed files with 8 additions and 8 deletions
  1. 8 8
      .github/workflows/buildandrelease.yml

+ 8 - 8
.github/workflows/buildandrelease.yml

@@ -18,7 +18,7 @@ jobs:
     steps:
     steps:
       - name: Get Version Number
       - name: Get Version Number
         run: |
         run: |
-          if [[ -n "${{ github.event.inputs.version }}" ]]; then
+          if [[ -n ${VERSION} || -n ${TAG} ]]; then
             NETMAKER_VERSION=${{ github.event.inputs.version }}
             NETMAKER_VERSION=${{ github.event.inputs.version }}
           else
           else
             NETMAKER_VERSION=$(curl -fsSL https://api.github.com/repos/gravitl/netmaker/tags | grep 'name' | head -1 | cut -d'"' -f4)
             NETMAKER_VERSION=$(curl -fsSL https://api.github.com/repos/gravitl/netmaker/tags | grep 'name' | head -1 | cut -d'"' -f4)
@@ -31,7 +31,7 @@ jobs:
         run: |
         run: |
           echo ${{ env.NETMAKER_VERSION }}
           echo ${{ env.NETMAKER_VERSION }}
           echo ${{ env.PACKAGE_VERSION }}
           echo ${{ env.PACKAGE_VERSION }}
-          if [ -z ${{ env.NETMAKER_VERSION }} || -z ${{ env.PACKAGE_VERSION }} ]
+          if [[ -z ${{ env.NETMAKER_VERSION }} || -z ${{ env.PACKAGE_VERSION }} ]]
           then
           then
             exit 1
             exit 1
           fi
           fi
@@ -47,7 +47,7 @@ jobs:
         run: |
         run: |
           TAG=${{needs.set-version.outputs.tag}}
           TAG=${{needs.set-version.outputs.tag}}
           VERSION=${{needs.set-version.outputs.version}}
           VERSION=${{needs.set-version.outputs.version}}
-          if [ -n ${VERSION} || -n ${TAG} ]; then
+          if [[ -n ${VERSION} || -n ${TAG} ]]; then
             exit 1
             exit 1
           fi
           fi
           echo "$NETMAKER_VERSION=${TAG}"  >> $GITHUB_ENV
           echo "$NETMAKER_VERSION=${TAG}"  >> $GITHUB_ENV
@@ -79,7 +79,7 @@ jobs:
         run: |
         run: |
           TAG=${{needs.set-version.outputs.tag}}
           TAG=${{needs.set-version.outputs.tag}}
           VERSION=${{needs.set-version.outputs.version}}
           VERSION=${{needs.set-version.outputs.version}}
-          if [ -n ${VERSION} || -n ${TAG} ]; then
+          if [[ -n ${VERSION} || -n ${TAG} ]]; then
             exit 1
             exit 1
           fi
           fi
           echo "$NETMAKER_VERSION=${TAG}"  >> $GITHUB_ENV
           echo "$NETMAKER_VERSION=${TAG}"  >> $GITHUB_ENV
@@ -165,7 +165,7 @@ jobs:
         run: |
         run: |
           TAG=${{needs.set-version.outputs.tag}}
           TAG=${{needs.set-version.outputs.tag}}
           VERSION=${{needs.set-version.outputs.version}}
           VERSION=${{needs.set-version.outputs.version}}
-          if [ -n ${VERSION} || -n ${TAG} ]; then
+          if [[ -n ${VERSION} || -n ${TAG} ]]; then
             exit 1
             exit 1
           fi
           fi
           echo "$NETMAKER_VERSION=${TAG}"  >> $GITHUB_ENV
           echo "$NETMAKER_VERSION=${TAG}"  >> $GITHUB_ENV
@@ -263,7 +263,7 @@ jobs:
         run: |
         run: |
           TAG=${{needs.set-version.outputs.tag}}
           TAG=${{needs.set-version.outputs.tag}}
           VERSION=${{needs.set-version.outputs.version}}
           VERSION=${{needs.set-version.outputs.version}}
-          if [ -n ${VERSION} || -n ${TAG} ]; then
+          if [[ -n ${VERSION} || -n ${TAG} ]]; then
             exit 1
             exit 1
           fi
           fi
           echo "$NETMAKER_VERSION=${TAG}"  >> $GITHUB_ENV
           echo "$NETMAKER_VERSION=${TAG}"  >> $GITHUB_ENV
@@ -296,7 +296,7 @@ jobs:
         run: |
         run: |
           TAG=${{needs.set-version.outputs.tag}}
           TAG=${{needs.set-version.outputs.tag}}
           VERSION=${{needs.set-version.outputs.version}}
           VERSION=${{needs.set-version.outputs.version}}
-          if [ -n ${VERSION} || -n ${TAG} ]; then
+          if [[ -n ${VERSION} || -n ${TAG} ]]; then
             exit 1
             exit 1
           fi
           fi
           echo "$NETMAKER_VERSION=${TAG}"  >> $GITHUB_ENV
           echo "$NETMAKER_VERSION=${TAG}"  >> $GITHUB_ENV
@@ -374,7 +374,7 @@ jobs:
         run: |
         run: |
           TAG=${{needs.set-version.outputs.tag}}
           TAG=${{needs.set-version.outputs.tag}}
           VERSION=${{needs.set-version.outputs.version}}
           VERSION=${{needs.set-version.outputs.version}}
-          if [ -n ${VERSION} || -n ${TAG} ]; then
+          if [[ -n ${VERSION} || -n ${TAG} ]]; then
             exit 1
             exit 1
           fi
           fi
           echo "$NETMAKER_VERSION=${TAG}"  >> $GITHUB_ENV
           echo "$NETMAKER_VERSION=${TAG}"  >> $GITHUB_ENV