Skip to content

Commit

Permalink
Another attempt at fixing duplicate check.
Browse files Browse the repository at this point in the history
  • Loading branch information
0x11DFE committed Mar 7, 2024
1 parent 680abbb commit 32ae367
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 3 deletions.
4 changes: 2 additions & 2 deletions .github/workflows/build-on-schedule.yml
Original file line number Diff line number Diff line change
Expand Up @@ -66,10 +66,10 @@ jobs:
- name: Check if module build ID already exists
id: check_build_id
run: |
BASENAME=${{ steps.extract_and_build.outputs.module_base_name }}
BASENAME="${{ steps.extract_and_build.outputs.module_base_name }}"
BUILD_ID=${{ steps.extract_and_build.outputs.device_build_id }}
EXISTING_RELEASE_NOTES=$(curl --silent "https://api.github.com/repos/$GITHUB_REPOSITORY/releases" | jq '.[].body')
if echo "$EXISTING_RELEASE_NOTES" | grep -q "$BASENAME\..*\($BUILD_ID\)"; then
if echo "$EXISTING_RELEASE_NOTES" | grep -q "${BASENAME}_${BUILD_ID}"; then
echo "BUILD_EXISTS=true" >> $GITHUB_OUTPUT
else
echo "BUILD_EXISTS=false" >> $GITHUB_OUTPUT
Expand Down
2 changes: 1 addition & 1 deletion build_magisk_module.sh
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,7 @@ device_build_security_patch=$(grep_prop "ro.vendor.build.security_patch" "$syste
device_codename=${device_codename^}

# Construct the base name
base_name="$device_codename.A$device_build_android_version.$(date -d "$device_build_security_patch" '+%y%m%d').($device_build_id)"
base_name="${device_codename}_$device_build_id"

# Prepare the result directory
mkdir -p "result/$result_base_name"
Expand Down

0 comments on commit 32ae367

Please sign in to comment.