diff --git a/.github/workflows/build-driver.yml b/.github/workflows/build-driver.yml index e5b60ec..3e03195 100644 --- a/.github/workflows/build-driver.yml +++ b/.github/workflows/build-driver.yml @@ -43,14 +43,6 @@ jobs: with: lein: '2.9.10' - - name: "Download metabase" - run: wget https://downloads.metabase.com/${{ inputs.metabase-version }}/metabase.jar - - - name: "Maven install" - run: | - mkdir repo - mvn deploy:deploy-file -Durl=file:repo -DgroupId=com.firebolt -DartifactId=metabase-core -Dversion=1.40 -Dpackaging=jar -Dfile=metabase.jar - - name: "Install dependencies" run: lein deps diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml index d5b257e..7ce8010 100644 --- a/.github/workflows/release.yml +++ b/.github/workflows/release.yml @@ -27,14 +27,6 @@ jobs: with: lein: '2.9.10' - - name: "Download metabase" - run: wget https://downloads.metabase.com/${{ github.event.inputs.metabase-version }}/metabase.jar - - - name: "Maven install" - run: | - mkdir repo - mvn deploy:deploy-file -Durl=file:repo -DgroupId=com.firebolt -DartifactId=metabase-core -Dversion=1.40 -Dpackaging=jar -Dfile=metabase.jar - - name: "Install dependencies" run: lein deps @@ -51,7 +43,7 @@ jobs: MAVEN_REPO_USERNAME: ${{ secrets.MAVEN_REPO_USERNAME }} MAVEN_REPO_PASSWORD: ${{ secrets.MAVEN_REPO_PASSWORD }} run: | - lein deploy + DEBUG=1 lein deploy echo "version=$(lein project-version | tail -1)" >> "${GITHUB_OUTPUT}" echo "jar-name=$(lein file-name | tail -1)" >> "${GITHUB_OUTPUT}" diff --git a/project.clj b/project.clj index 0eda241..4241008 100644 --- a/project.clj +++ b/project.clj @@ -39,7 +39,8 @@ :signing {:gpg-key ~(System/getenv "SIGN_KEY_ID")} - :plugins [[lein-pprint "1.3.2"]] + :plugins [[lein-pprint "1.3.2"] + [lein-shell "0.5.0"]] :aliases {"file-name" ["with-profile" "uberjar" "pprint" "--no-pretty" "--" ":uberjar-name"] "project-version" ["pprint" "--no-pretty" "--" ":version"]} @@ -57,7 +58,13 @@ :profiles {:provided - {:dependencies [[com.firebolt/metabase-core "1.40"]]} + {:dependencies [[com.firebolt/metabase-core "1.40"]] + :prep-tasks [["shell" "bash" "-c" + "TMP_DIR=\\$(mktemp -d) && \\ + wget -nv https://downloads.metabase.com/\\$METABASE_VERSION/metabase.jar -O \\$TMP_DIR/metabase.jar && \\ + mkdir -p repo && \\ + mvn deploy:deploy-file -Durl=file:repo -DgroupId=com.firebolt -DartifactId=metabase-core -Dversion=1.40 -Dpackaging=jar -Dfile=\\$TMP_DIR/metabase.jar"] + "javac" "compile"]} :uberjar {:auto-clean true