Skip to content

Commit a0133d9

Browse files
authored
Don't copy xattrs when creating release (#130)
* Don't copy xattrs when creating release This is producing some warnings * Fix clippy * Fix build script to not hardcode sdk version
1 parent 5dd5ff9 commit a0133d9

File tree

3 files changed

+8
-7
lines changed

3 files changed

+8
-7
lines changed

crates/sshx-server/src/grpc.rs

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -122,7 +122,8 @@ impl SshxService for GrpcServer {
122122
}
123123

124124
/// Validate the client token for a session.
125-
fn validate_token(mac: impl Mac, name: &str, token: &str) -> Result<(), Status> {
125+
#[allow(clippy::result_large_err)]
126+
fn validate_token(mac: impl Mac, name: &str, token: &str) -> tonic::Result<()> {
126127
if let Ok(token) = BASE64_STANDARD.decode(token) {
127128
if mac.chain_update(name).verify_slice(&token).is_ok() {
128129
return Ok(());

crates/sshx/src/runner.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -117,7 +117,7 @@ async fn shell_task(
117117
let data = encrypt.segment(
118118
0x100000000 | id.0 as u64, // stream number
119119
(content_offset + start) as u64,
120-
content[start..end].as_bytes(),
120+
&content.as_bytes()[start..end],
121121
);
122122
let data = TerminalData {
123123
id: id.0,

scripts/release.sh

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -28,8 +28,8 @@ CARGO_TARGET_ARMV7_UNKNOWN_LINUX_MUSLEABIHF_LINKER=armv7-unknown-linux-musleabih
2828
cargo build --release --target armv7-unknown-linux-musleabihf
2929

3030
# x86_64-apple-darwin: for macOS on Intel
31-
SDKROOT=$(xcrun -sdk macosx15.2 --show-sdk-path) \
32-
MACOSX_DEPLOYMENT_TARGET=$(xcrun -sdk macosx15.2 --show-sdk-platform-version) \
31+
SDKROOT=$(xcrun --show-sdk-path) \
32+
MACOSX_DEPLOYMENT_TARGET=$(xcrun --show-sdk-platform-version) \
3333
cargo build --release --target x86_64-apple-darwin
3434

3535
# aarch64-apple-darwin: for macOS on Apple Silicon
@@ -60,15 +60,15 @@ for target in "${targets[@]}"
6060
do
6161
if [[ ! $target == *"windows"* ]]; then
6262
echo "compress: target/$target/release/sshx"
63-
tar czf $temp -C target/$target/release sshx
63+
tar --no-xattrs -czf $temp -C target/$target/release sshx
6464
aws s3 cp $temp s3://sshx/sshx-$target.tar.gz
6565

6666
echo "compress: target/$target/release/sshx-server"
67-
tar czf $temp -C target/$target/release sshx-server
67+
tar --no-xattrs -czf $temp -C target/$target/release sshx-server
6868
aws s3 cp $temp s3://sshx/sshx-server-$target.tar.gz
6969
else
7070
echo "compress: target/$target/release/sshx.exe"
71-
rm $temp && zip -j $temp target/$target/release/sshx.exe
71+
rm $temp && zip -X -j $temp target/$target/release/sshx.exe
7272
aws s3 cp $temp s3://sshx/sshx-$target.zip
7373
fi
7474
done

0 commit comments

Comments
 (0)