Skip to content

Commit

Permalink
chore: update bash script shebangs and dockerfiles (#3875)
Browse files Browse the repository at this point in the history
Development from Aztec.

---------

Co-authored-by: ludamad <adam.domurad@gmail.com>
Co-authored-by: ludamad <adam@aztecprotocol.com>
Co-authored-by: kevaundray <kevtheappdev@gmail.com>
Co-authored-by: sirasistant <sirasistant@gmail.com>
Co-authored-by: Gregorio Juliana <gregojquiros@gmail.com>
Co-authored-by: Tom French <tom@tomfren.ch>
  • Loading branch information
7 people committed Dec 19, 2023
1 parent 04dc478 commit c2c3388
Show file tree
Hide file tree
Showing 9 changed files with 21 additions and 20 deletions.
2 changes: 1 addition & 1 deletion .github/actions/docs/build-status/script.sh
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
#!/bin/bash
#!/usr/bin/env bash

BRANCH_NAME=$(echo "$BRANCH_NAME" | sed -e "s#refs/[^/]*/##")
DEPLOY_STATUS=$(curl -X GET "https://api.netlify.com/api/v1/sites/$SITE_ID/deploys?branch=$BRANCH_NAME" | jq -r '.[] | select(.created_at != null) | .state' | head -1)
Expand Down
17 changes: 7 additions & 10 deletions Dockerfile
Original file line number Diff line number Diff line change
@@ -1,15 +1,12 @@
FROM rust:alpine3.17
RUN apk update \
&& apk upgrade \
&& apk add --no-cache \
build-base \
bash
FROM rust:bookworm
WORKDIR /usr/src/noir
COPY . .
RUN ./scripts/bootstrap_native.sh

# When running the container, mount the current working directory to /project.
FROM alpine:3.17
# When running the container, mount the users home directory to same location.
FROM ubuntu:lunar
# Install Tini as nargo doesn't handle signals properly.
# Install git as nargo needs it to clone.
RUN apt-get update && apt-get install -y git tini && rm -rf /var/lib/apt/lists/* && apt-get clean
COPY --from=0 /usr/src/noir/target/release/nargo /usr/src/noir/target/release/nargo
WORKDIR /project
ENTRYPOINT ["/usr/src/noir/target/release/nargo"]
ENTRYPOINT ["/usr/bin/tini", "--", "/usr/src/noir/target/release/nargo"]
2 changes: 1 addition & 1 deletion bootstrap.sh
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
#!/bin/bash
#!/usr/bin/env bash
set -eu

cd $(dirname "$0")
Expand Down
2 changes: 1 addition & 1 deletion compiler/integration-tests/scripts/codegen-verifiers.sh
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
#!/bin/bash
#!/usr/bin/env bash

self_path=$(dirname "$(readlink -f "$0")")

Expand Down
8 changes: 6 additions & 2 deletions scripts/bootstrap_native.sh
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
#!/bin/bash
#!/usr/bin/env bash
set -eu

cd $(dirname "$0")/..
Expand All @@ -13,4 +13,8 @@ else
fi

# Build native.
cargo build --release
if [ -n "${DEBUG:-}" ]; then
cargo build
else
cargo build --release
fi
2 changes: 1 addition & 1 deletion scripts/bootstrap_packages.sh
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
#!/bin/bash
#!/usr/bin/env bash
set -eu

cd $(dirname "$0")/..
Expand Down
2 changes: 1 addition & 1 deletion scripts/install_wasm-bindgen.sh
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
#!/bin/bash
#!/usr/bin/env bash
set -eu

cd $(dirname "$0")/..
Expand Down
2 changes: 1 addition & 1 deletion test_programs/gates_report.sh
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
#!/bin/bash
#!/usr/bin/env bash
set -e

# These tests are incompatible with gas reporting
Expand Down
4 changes: 2 additions & 2 deletions test_programs/rebuild.sh
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
#!/bin/bash
#!/usr/bin/env bash
set -e

process_dir() {
Expand All @@ -14,7 +14,7 @@ process_dir() {
if [ -d ./target/ ]; then
rm -r ./target/
fi
cargo run compile --only-acir && cargo run execute witness
nargo compile --only-acir && nargo execute witness

if [ -d "$current_dir/acir_artifacts/$dir_name/target" ]; then
rm -r "$current_dir/acir_artifacts/$dir_name/target"
Expand Down

0 comments on commit c2c3388

Please sign in to comment.