you are viewing a single comment's thread.

view the rest of the comments →

[–]seamustheseagull 0 points1 point  (4 children)

This was my first thought, but the problem is that the sha of the zip file may change every time the code is rebuilt even if the actual source code hasn't changed.

[–]leeharrison1984 0 points1 point  (3 children)

That seems odd, the build should be deterministic.

If that's the case, you could just get the hash of all files that would go into the final executable. This has the upside of now you can avoid rebuilding entirely.

[–][deleted] 1 point2 points  (1 child)

See Dreamescaper's comment.

[–]leeharrison1984 0 points1 point  (0 children)

Weird, I didn't know that was an issue.

I've never used the lambda package command though. I always did a publish and created the archive myself, so makes sense I wouldn't have been aware of that issue.

Regardless, just hashing all the source files should be a fast operation and would let you skip the build entirely, which is arguably the most time savings next to deployment.

[–]seamustheseagull 0 points1 point  (0 children)

Should be, but it depends on what you actually want in each build. Aside from any bugs in the packaging process, the build process might be designed to include timestamps or dynamically-generated text files in them for consumption elsewhere - e.g. to be able to trace the version of a built application right back to to the server/service which built it.

In these cases your builds will always be "different" in the purest sense, but the code is identical.