Skip to content

Commit

Permalink
fix(sqitch-ci): uniq should be applied on sorted text
Browse files Browse the repository at this point in the history
  • Loading branch information
matthieu-foucault committed Jun 22, 2020
1 parent f31e365 commit 18e7347
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion .bin/sqitch-check-immutable-files.sh
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ changes_after_last_tag=$(tac "${1}"/sqitch.plan | sed '/^@/Q' | cut -d' ' -f1)

# comm compares two ordered files and returns three columns "-23" suppresses colums 2 and 3,
# so it only returns the first column (the lines unique to file 1)
immutable_modified_files=$(comm -23 <(echo "$modified_changes" | uniq | sort) <(echo "$changes_after_last_tag" | sort))
immutable_modified_files=$(comm -23 <(echo "$modified_changes" | sort | uniq) <(echo "$changes_after_last_tag" | sort | uniq))
if [ -n "$immutable_modified_files" ]; then
echo "The following sqitch changes are immutable as they are part of a tagged release. Please add incremental changes instead."
echo "$immutable_modified_files"
Expand Down

0 comments on commit 18e7347

Please sign in to comment.