Skip to content

Commit 88c23a3

Browse files
committed
Reproducible builds for all targets
1 parent 3b846be commit 88c23a3

File tree

2 files changed

+26
-13
lines changed

2 files changed

+26
-13
lines changed

build-releases.sh

Lines changed: 19 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -6,6 +6,12 @@ set -e
66
# Set reproducible timestamp
77
export SOURCE_DATE_EPOCH=$(git log -1 --format=%ct)
88

9+
# Additional environment variables for reproducible builds
10+
export DOTNET_DETERMINISTIC=1
11+
export DOTNET_SKIP_FIRST_TIME_EXPERIENCE=1
12+
export DOTNET_CLI_TELEMETRY_OPTOUT=1
13+
export TZ=UTC
14+
915
VERSION=${1:-$(grep -oP '<Version>\K[^<]+' src/jot/jot.csproj)}
1016
echo "Building jot version: $VERSION (timestamp: $SOURCE_DATE_EPOCH)"
1117

@@ -15,10 +21,10 @@ mkdir -p ./releases
1521

1622
# Define platforms
1723
declare -a platforms=(
18-
# "win-x64:windows:.exe"
24+
"win-x64:windows:.exe"
1925
"linux-x64:linux:"
20-
# "osx-x64:macos:"
21-
# "osx-arm64:macos-arm:"
26+
"osx-x64:macos:"
27+
"osx-arm64:macos-arm:"
2228
)
2329

2430
echo "Building for all platforms..."
@@ -49,14 +55,21 @@ for platform_info in "${platforms[@]}"; do
4955
--output "./releases/build/$rid" \
5056
-p:PublishSingleFile=true \
5157
-p:Version="$VERSION" \
52-
-p:PublishTrimmed=true
58+
-p:PublishTrimmed=true \
59+
-p:Deterministic=true \
60+
-p:PathMap="$(pwd)=." \
61+
-p:ContinuousIntegrationBuild=true
5362
fi
5463

5564
# Create archive
5665
cd "./releases/build/$rid"
66+
67+
# Set consistent timestamps on all files
68+
find . -exec touch -d "@${SOURCE_DATE_EPOCH}" {} \;
69+
5770
if [ "$rid" = "win-x64" ]; then
58-
# Sort files for consistent zip
59-
find . -type f | sort | zip -r -X "../../jot-$VERSION-$os_name.zip" -@
71+
# Create reproducible zip (method compatible with older zip versions)
72+
find . -type f | sort | zip -r -X -q "../../jot-$VERSION-$os_name.zip" -@ -9
6073
echo "Created: releases/jot-$VERSION-$os_name.zip"
6174
else
6275
# Sort files for consistent tar

debian/changelog

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@ jot (0.0.7) unstable; urgency=low
66
* CsvHelper removed in favor of Sep for CSV parsing to support AOT /
77
trimmable binary
88

9-
-- Sean McElroy <me@seanmcelroy.com> Tue, 10 Jun 2025 00:00:00 -0500
9+
-- Sean McElroy <me@seanmcelroy.com> Tue, 10 Jun 2025 00:00:00 +0000
1010

1111
jot (0.0.6) unstable; urgency=low
1212

@@ -36,14 +36,14 @@ jot (0.0.6) unstable; urgency=low
3636
* Invalid field values are now rendered with warning colors in views
3737
* Setting a month+date field now does not complain about an invalid value.
3838

39-
-- Sean McElroy <me@seanmcelroy.com> Mon, 09 Jun 2025 00:00:00 -0500
39+
-- Sean McElroy <me@seanmcelroy.com> Mon, 09 Jun 2025 00:00:00 +0000
4040

4141
jot (0.0.5) unstable; urgency=low
4242

4343
* pomodoro (aka pomo) command added to jot, whch implements Pomodoro timers
4444
* Updated documentation, moved to docs/ folder under jot
4545

46-
-- Sean McElroy <me@seanmcelroy.com> Sun, 27 Apr 2025 00:00:00 -0500
46+
-- Sean McElroy <me@seanmcelroy.com> Sun, 27 Apr 2025 00:00:00 +0000
4747

4848
jot (0.0.4) unstable; urgency=low
4949

@@ -54,23 +54,23 @@ jot (0.0.4) unstable; urgency=low
5454
* Updated README.md
5555
* Updated licensing banners in jot
5656

57-
-- Sean McElroy <me@seanmcelroy.com> Sun, 13 Apr 2025 00:00:00 -0500
57+
-- Sean McElroy <me@seanmcelroy.com> Sun, 13 Apr 2025 00:00:00 +0000
5858

5959
jot (0.0.3) unstable; urgency=low
6060

6161
* 'initialize schemas' command which provides built-in system schemas.
6262

63-
-- Sean McElroy <me@seanmcelroy.com> Fri, 11 Apr 2025 00:00:00 -0500
63+
-- Sean McElroy <me@seanmcelroy.com> Fri, 11 Apr 2025 00:00:00 +0000
6464

6565
jot (0.0.2) unstable; urgency=low
6666

6767
* Added up/down arrow history support to the interactive mode.
6868

69-
-- Sean McElroy <me@seanmcelroy.com> Thu, 20 Mar 2025 00:00:00 -0500
69+
-- Sean McElroy <me@seanmcelroy.com> Thu, 20 Mar 2025 00:00:00 +0000
7070

7171
jot (0.0.1) unstable; urgency=low
7272

7373
* Published Github repository as public to denote this is version 0.0.1
7474

75-
-- Sean McElroy <me@seanmcelroy.com> Tue, 18 Mar 2025 00:00:00 -0500
75+
-- Sean McElroy <me@seanmcelroy.com> Tue, 18 Mar 2025 00:00:00 +0000
7676

0 commit comments

Comments
 (0)