Skip to content

Commit d7e9269

Browse files
committed
Remove confusing EXE_NAME environment variable
This removes the `EXE_NAME` variable in the release workflow, replacing all uses of it with an literal `ein`, which was always its value. The rationale is that this variable was confusing in two ways: - The release workflow builds and publishes two executables, for both the ein and gix commands. The executable for the ein command was specified through this environment variable, while the executable for the gix command was already given literally. Besides improving consistency, removing the environment variable makes clear what is actually being specified. - The name of the executable that provides the ein command is `ein` on most operating systems but `ein.exe` on Windows. But the `EXE_NAME` variable always held the value `ein` on all systems, with a `.exe` suffix concatenated to it on Windows. This was unintuitive because `EXE_NAME` didn't always name an executable.
1 parent 3e779d9 commit d7e9269

File tree

1 file changed

+4
-6
lines changed

1 file changed

+4
-6
lines changed

.github/workflows/release.yml

Lines changed: 4 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -83,8 +83,6 @@ jobs:
8383
TARGET_DIR: ./target
8484
# Emit backtraces on panics.
8585
RUST_BACKTRACE: 1
86-
# The name of the executable to expect
87-
EXE_NAME: ein
8886
strategy:
8987
matrix:
9088
build: [ linux, linux-arm, macos, win-msvc, win-gnu, win32-msvc ]
@@ -184,7 +182,7 @@ jobs:
184182

185183
- name: Strip release binary (linux and macos)
186184
if: matrix.build == 'linux' || matrix.build == 'macos'
187-
run: strip target/${{ matrix.target }}/release/${{ env.EXE_NAME }} target/${{ matrix.target }}/release/gix
185+
run: strip target/${{ matrix.target }}/release/ein target/${{ matrix.target }}/release/gix
188186

189187
- name: Strip release binary (arm)
190188
if: matrix.build == 'linux-arm'
@@ -193,7 +191,7 @@ jobs:
193191
"$PWD/target:/target:Z" \
194192
rustembedded/cross:arm-unknown-linux-gnueabihf \
195193
arm-linux-gnueabihf-strip \
196-
/target/arm-unknown-linux-gnueabihf/release/${{ env.EXE_NAME }} \
194+
/target/arm-unknown-linux-gnueabihf/release/ein \
197195
/target/arm-unknown-linux-gnueabihf/release/gix
198196
- name: Build archive
199197
run: |
@@ -203,11 +201,11 @@ jobs:
203201
cp {README.md,LICENSE-*,CHANGELOG.md} "$staging/"
204202
205203
if [ "${{ matrix.os }}" = "windows-latest" ]; then
206-
cp target/release/${{ env.EXE_NAME }}.exe target/release/gix.exe "$staging/"
204+
cp target/release/ein.exe target/release/gix.exe "$staging/"
207205
7z a "$staging.zip" "$staging"
208206
echo "ASSET=$staging.zip" >> $GITHUB_ENV
209207
else
210-
cp target/${{ matrix.target }}/release/${{ env.EXE_NAME }} target/${{ matrix.target }}/release/gix "$staging/"
208+
cp target/${{ matrix.target }}/release/ein target/${{ matrix.target }}/release/gix "$staging/"
211209
tar czf "$staging.tar.gz" "$staging"
212210
echo "ASSET=$staging.tar.gz" >> $GITHUB_ENV
213211
fi

0 commit comments

Comments
 (0)