Skip to content

Commit

Permalink
embed metabase fetching into lein config
Browse files Browse the repository at this point in the history
  • Loading branch information
stepansergeevitch committed Oct 22, 2024
1 parent 991ab3a commit 4aab724
Show file tree
Hide file tree
Showing 3 changed files with 10 additions and 19 deletions.
8 changes: 0 additions & 8 deletions .github/workflows/build-driver.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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

Expand Down
10 changes: 1 addition & 9 deletions .github/workflows/release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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

Expand All @@ -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}"
Expand Down
11 changes: 9 additions & 2 deletions project.clj
Original file line number Diff line number Diff line change
Expand Up @@ -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"]}
Expand All @@ -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
Expand Down

0 comments on commit 4aab724

Please sign in to comment.