Skip to content

Incorporate winapi workaround #2

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 5 commits into from
Jun 13, 2021
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions .github/workflows/ShellCheck.yml
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,6 @@ jobs:
steps:
- uses: actions/checkout@v2
- name: Run ShellCheck
uses: ludeeus/action-shellcheck@master
uses: bewuethr/shellcheck-action@master
env:
SHELLCHECK_OPTS: -e SC2164 -e SC2039 -e SC1091 -e SC1090 -e SC2002
SHELLCHECK_OPTS: -e SC2002 -e SC2164
14 changes: 10 additions & 4 deletions bin/vendor-rust
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
#!/bin/bash
#!/usr/bin/sh

# Packaging script for Rust:
# create vendor tarball
Expand All @@ -7,14 +7,14 @@
# remove previous artifact, if any
destdir="/tmp"
target="vendor.tar.xz"
if [[ -f "$target" ]]; then
if [ -f "$target" ]; then
rm $target
fi

# target specific archive
file="$1"

if [[ -z "$file" ]]; then
if [ -z "$file" ]; then
project=$(basename "$PWD")
file=$(ls ./*"${project}"*tar*)
echo "Inferred $file as target"
Expand All @@ -40,6 +40,13 @@ done

CARGO_NET_GIT_FETCH_WITH_CLI=true cargo vendor

## Post-vendor fixes
if [ -d vendor/winapi ]; then
echo -n "WINAPI detected. Removing MS binaries... "
rm -fr vendor/winapi*gnu*/lib/*.a
echo "done"
fi

time tar -cf - vendor/ | xz -9 -c - > "$target"

# get back to project dir
Expand All @@ -53,4 +60,3 @@ ls -lh "$tarball"
echo -n "Copying ..."
cp "$tarball" .
echo -n "done"