Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
29 changes: 23 additions & 6 deletions .github/workflows/jar-and-R-ci.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -57,12 +57,29 @@ jobs:
- name: Create pull request
# https://github.com/actions/checkout/pull/1184
run: |
git config user.name "github-actions[bot]"
git config user.email "41898282+github-actions[bot]@users.noreply.github.com"
mv java-r5rcore/build/libs/java-r5rcore-*.jar r-package/inst/jar/r5r.jar
git add r-package/inst/jar/r5r.jar
git commit -m "Rebuild JAR for commit ${GITHUB_SHA}"
git push
NEW_JAR="java-r5rcore/build/libs/java-r5rcore-*.jar"
TARGET_JAR="r-package/inst/jar/r5r.jar"

new_sha=$(sha256sum $NEW_JAR | awk '{print $1}')
# ensure file exists and then compute sha
old_sha=$( [ -f "$TARGET_JAR" ] && sha256sum "$TARGET_JAR" | awk '{print $1}' || echo "" )

echo "NEW: $new_sha"
echo "OLD: $old_sha"

# Only push if sha different
if [ "$new_sha" != "$old_sha" ]; then
git config user.name "github-actions[bot]"
git config user.email "41898282+github-actions[bot]@users.noreply.github.com"

echo "JAR changed — updating."
mv $NEW_JAR $TARGET_JAR
git add $TARGET_JAR
git commit -m "Rebuild JAR for commit ${GITHUB_SHA}"
git push
else
echo "JAR unchanged — skipping commit."
fi

R-CMD-check:
needs: build-jar
Expand Down
5 changes: 5 additions & 0 deletions java-r5rcore/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,11 @@ plugins {
id 'java'
}

tasks.withType(Jar).configureEach {
preserveFileTimestamps = false
reproducibleFileOrder = true
}

group 'org.ipea'
version '1.1.0999-SNAPSHOT'

Expand Down
Binary file modified r-package/inst/jar/r5r.jar
Binary file not shown.
Loading