Skip to content

Commit

Permalink
improve getting metabase core
Browse files Browse the repository at this point in the history
  • Loading branch information
stepansergeevitch committed Oct 22, 2024
1 parent 6f8bd68 commit 46edac8
Show file tree
Hide file tree
Showing 3 changed files with 12 additions and 10 deletions.
4 changes: 3 additions & 1 deletion .github/workflows/build-driver.yml
Original file line number Diff line number Diff line change
Expand Up @@ -44,7 +44,9 @@ jobs:
lein: '2.9.10'

- name: "Install dependencies"
run: lein deps
run: |
METABASE_VERSION=${{ github.event.inputs.metabase-version || 'v0.48.0' }} lein get-metabase-core
lein deps
- name: "Package into a jar"
id: package
Expand Down
4 changes: 3 additions & 1 deletion .github/workflows/release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,9 @@ jobs:
lein: '2.9.10'

- name: "Install dependencies"
run: lein prep && lein deps
run: |
METABASE_VERSION=${{ github.event.inputs.metabase-version || 'v0.48.0' }} lein get-metabase-core
lein deps
- name: Import GPG key
uses: crazy-max/ghaction-import-gpg@v6
Expand Down
14 changes: 6 additions & 8 deletions project.clj
Original file line number Diff line number Diff line change
Expand Up @@ -43,7 +43,12 @@
[lein-shell "0.5.0"]]

:aliases {"file-name" ["with-profile" "uberjar" "pprint" "--no-pretty" "--" ":uberjar-name"]
"project-version" ["pprint" "--no-pretty" "--" ":version"]}
"project-version" ["pprint" "--no-pretty" "--" ":version"]
"get-metabase-core" ["do" ["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"]]}

:pom-plugins [[org.apache.maven.plugins/maven-source-plugin "3.2.1"
;; this section is optional, values have the same syntax as pom-addition
Expand All @@ -55,13 +60,6 @@
[:goals ([:goal "jar"])]
[:phase "deploy"]])}]]

: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"]

:profiles
{:provided
{:dependencies [[com.firebolt/metabase-core "1.40"]]}
Expand Down

0 comments on commit 46edac8

Please sign in to comment.