Skip to content

Commit

Permalink
Update update_datasources.yml
Browse files Browse the repository at this point in the history
  • Loading branch information
jmillanacosta authored Jul 18, 2024
1 parent bc37622 commit 75aeb77
Showing 1 changed file with 2 additions and 7 deletions.
9 changes: 2 additions & 7 deletions .github/workflows/update_datasources.yml
Original file line number Diff line number Diff line change
Expand Up @@ -64,13 +64,8 @@ jobs:
input_file="inst/apps/processed_mapping_files/dataSourceVersion-old.tsv"
output_file="inst/apps/processed_mapping_files/dataSourceVersion.tsv"
# Update the file using awk
awk -F'\t' -v OFS='\t' -v ds="$datasource" -v nd="$new_date" -v nv="$new_version" '
BEGIN { OFS = FS }
NR==1 { print; next }
$1 == ds { $2 = nv; $4 = nd }
{ print }
' "$input_file" > "$output_file"
if [ "$(md5sum file1 | awk '{ print $1 }')" == "$(md5sum file2 | awk '{ print $1 }')" ]; then
awk -F'\t' -v OFS='\t' -v ds="$datasource" -v nd="$new_date" -v nv="$new_version" '
if diff "$file1" "$file2" >/dev/null 2>&1; then
echo changes=False >> $GITHUB_ENV
else
echo changes=True >> $GITHUB_ENV
Expand Down

0 comments on commit 75aeb77

Please sign in to comment.