Skip to content

Commit

Permalink
fix: build linux executable with Debian Stretch (supports GLibC 2.18+)
Browse files Browse the repository at this point in the history
  • Loading branch information
rholshausen committed Oct 24, 2022
1 parent 5bee6ed commit ca3c5d0
Show file tree
Hide file tree
Showing 3 changed files with 11 additions and 3 deletions.
6 changes: 6 additions & 0 deletions Dockerfile.linux-build
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
FROM rust:stretch

RUN rustup install stable && rustup default stable
RUN rustup component add rustfmt

ENTRYPOINT ["/bin/bash"]
1 change: 0 additions & 1 deletion README.md
Original file line number Diff line number Diff line change
@@ -1,7 +1,6 @@
# Standalone Pact Stub Server

[![Build](https://github.com/uglyog/pact-stub-server/workflows/Build/badge.svg)](https://github.com/uglyog/pact-stub-server/actions?query=workflow%3ABuild)
[![Windows Build status](https://ci.appveyor.com/api/projects/status/vigbo2qdyk9x7mo9?svg=true)](https://ci.appveyor.com/project/uglyog/pact-stub-server)

This project provides a server that can generate responses based on pact files. It is a single executable binary.
It implements the [V4 Pact specification](https://github.com/pact-foundation/pact-specification/tree/version-4).
Expand Down
7 changes: 5 additions & 2 deletions scripts/release-linux.sh
Original file line number Diff line number Diff line change
@@ -1,7 +1,10 @@
#!/bin/bash -xe
#!/bin/bash

set -e

echo -- Build the Docker build image --
docker build -f Dockerfile.linux-build -t linux-build .

mkdir -p target/artifacts
cargo build --release
docker run -t --rm --user "$(id -u)":"$(id -g)" -v "$(pwd):/workspace" -w /workspace linux-build -c 'cargo build --release'
gzip -c target/release/pact-stub-server > target/artifacts/pact-stub-server-linux-x86_64.gz

0 comments on commit ca3c5d0

Please sign in to comment.