Skip to content

Commit 771b63d

Browse files
Ben Turnergistinc
authored andcommitted
Make sure sprite sources are always processed/added in a consistent order to avoid regenerating sprite files that differ only by the order in which the sprites appear (seen when sprites are maintained by multiple users whose filesystems produce Dir globs in different orders).
1 parent 01b58e1 commit 771b63d

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

lib/sprite/builder.rb

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -57,7 +57,7 @@ def build
5757
protected
5858
def write_image(image)
5959
results = []
60-
sources = image['sources'].to_a
60+
sources = image['sources'].to_a.sort
6161
return unless sources.length > 0
6262

6363
name = image['name']
@@ -202,4 +202,4 @@ def path_present?(path)
202202
path.to_s.strip != ""
203203
end
204204
end
205-
end
205+
end

0 commit comments

Comments
 (0)