Skip to content

Commit

Permalink
Always use latest tool version
Browse files Browse the repository at this point in the history
  • Loading branch information
mateuszkwiecinski committed Jan 17, 2024
1 parent 7118d2a commit da35707
Show file tree
Hide file tree
Showing 3 changed files with 11 additions and 2 deletions.
1 change: 1 addition & 0 deletions .github/workflows/main.yml
Original file line number Diff line number Diff line change
Expand Up @@ -90,6 +90,7 @@ jobs:
if: github.event_name == 'pull_request'
with:
configuration: runtimeClasspath
lib-version: "1.2.1"
build-root-directory: testproject
additional-gradle-arguments: "--no-configuration-cache --stacktrace"
project: ""
Expand Down
2 changes: 1 addition & 1 deletion action.yml
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ inputs:
lib-version:
description: 'Dependency diff library version'
required: true
default: '1.2.1'
default: 'latest'
additional-gradle-arguments:
description: 'Additional arguments passed to gradle commands'
required: false
Expand Down
10 changes: 9 additions & 1 deletion entrypoint.sh
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,15 @@

cd "$INPUT_BUILD_ROOT_DIR"

wget "https://github.com/JakeWharton/dependency-tree-diff/releases/download/$INPUT_VERSION/dependency-tree-diff.jar" -q -O dependency-tree-diff.jar
if [ "$INPUT_VERSION" == "latest" ]; then
curl -s https://api.github.com/repos/JakeWharton/dependency-tree-diff/releases/latest \
| grep "dependency-tree-diff.jar" \
| cut -d : -f 2,3 \
| tr -d \"\
| wget -qi -O dependency-tree-diff.jar -
else
wget "https://github.com/JakeWharton/dependency-tree-diff/releases/download/$INPUT_VERSION/dependency-tree-diff.jar" -q -O dependency-tree-diff.jar
fi

if [ "$INPUT_PROJECT" == ":" ]; then
INPUT_PROJECT=""
Expand Down

0 comments on commit da35707

Please sign in to comment.