diff --git a/.github/workflows/ubuntu-matrix.yml b/.github/workflows/ubuntu-matrix.yml index db4aab1..f269c86 100644 --- a/.github/workflows/ubuntu-matrix.yml +++ b/.github/workflows/ubuntu-matrix.yml @@ -28,14 +28,23 @@ jobs: runs-on: ${{ matrix.os }} steps: - uses: styfle/cancel-workflow-action@0.11.0 + if: ${{ !env.ACT }} with: access_token: ${{ github.token }} - - uses: actions/checkout@v2 - - name: printenv + - uses: actions/checkout@v3 + with: + fetch-depth: '0' + submodules: 'recursive' + set-safe-directory: 'true' + - name: printenv && sudo apt update && sudo apt install scdoc -y run: | - printenv + printenv && sudo apt update && sudo apt install scdoc -y + - name: rm -rf deps + run: | + rm -rf deps - name: make run: | + mkdir -p /usr/local/share/man/man1/nostril.1 make - name: sudo make install run: | @@ -43,7 +52,8 @@ jobs: - name: man nostril run: | man nostril - - name: sudo -su runner nostril + - name: sudo ./nostril run: | #pipe handles non-zero return from nostril default help - sudo -su runner nostril | echo "${PIPESTATUS[0]}" + file nostril + sudo ./nostril >/dev/null | echo "${PIPESTATUS[0]}" diff --git a/.github/workflows/ubuntu-pre-release.yml b/.github/workflows/ubuntu-pre-release.yml index 1b72cad..8096f0b 100644 --- a/.github/workflows/ubuntu-pre-release.yml +++ b/.github/workflows/ubuntu-pre-release.yml @@ -18,15 +18,21 @@ jobs: runs-on: ${{ matrix.os }} steps: - uses: styfle/cancel-workflow-action@0.11.0 + if: ${{ !env.ACT }} with: access_token: ${{ github.token }} - - uses: actions/checkout@v2 - - name: "printenv" + - uses: actions/checkout@v3 + with: + fetch-depth: '0' + submodules: 'recursive' + set-safe-directory: 'true' + - name: printenv && sudo apt update && sudo apt install scdoc -y run: | - printenv + printenv && sudo apt update && sudo apt install scdoc -y - name: "Build pre-release" run: | - make + mkdir -p /usr/local/share/man/man1/nostril.1 + make nostril mv nostril nostril-$RUNNER_OS-$RUNNER_ARCH shasum -a 256 nostril-$RUNNER_OS-$RUNNER_ARCH > nostril-$RUNNER_OS-$RUNNER_ARCH.sha256.txt mv nostril-query nostril-query-$RUNNER_OS-$RUNNER_ARCH @@ -37,6 +43,7 @@ jobs: - name: Set output run: echo "{name}={value}" >> $GITHUB_OUTPUT - uses: "marvinpinto/action-automatic-releases@latest" + if: ${{ !env.ACT }} with: repo_token: "${{ secrets.GITHUB_TOKEN }}" automatic_release_tag: ${{ matrix.os }} diff --git a/.github/workflows/ubuntu-release.yml b/.github/workflows/ubuntu-release.yml index 667cddc..f59e20a 100644 --- a/.github/workflows/ubuntu-release.yml +++ b/.github/workflows/ubuntu-release.yml @@ -18,15 +18,21 @@ jobs: runs-on: ${{ matrix.os }} steps: - uses: styfle/cancel-workflow-action@0.11.0 + if: ${{ !env.ACT }} with: access_token: ${{ github.token }} - - uses: actions/checkout@v2 - - name: "printenv" + - uses: actions/checkout@v3 + with: + fetch-depth: '0' + submodules: 'recursive' + set-safe-directory: 'true' + - name: printenv && sudo apt update && sudo apt install scdoc -y run: | - printenv + printenv && sudo apt update && sudo apt install scdoc -y - name: "Build release" run: | - make + mkdir -p /usr/local/share/man/man1/nostril.1 + make nostril mv nostril nostril-$RUNNER_OS-$RUNNER_ARCH shasum -a 256 nostril-$RUNNER_OS-$RUNNER_ARCH > nostril-$RUNNER_OS-$RUNNER_ARCH.sha256.txt mv nostril-query nostril-query-$RUNNER_OS-$RUNNER_ARCH @@ -37,6 +43,7 @@ jobs: - name: Set output run: echo "{name}={value}" >> $GITHUB_OUTPUT - uses: "marvinpinto/action-automatic-releases@latest" + if: ${{ !env.ACT }} with: repo_token: "${{ secrets.GITHUB_TOKEN }}" automatic_release_tag: ${{ matrix.os }} diff --git a/.gitmodules b/.gitmodules index 967defe..0f87e1a 100644 --- a/.gitmodules +++ b/.gitmodules @@ -1,3 +1,6 @@ [submodule "deps/secp256k1"] path = deps/secp256k1 url = https://github.com/bitcoin-core/secp256k1 + ignore = dirty + branch = master + depth = shallow diff --git a/Makefile b/Makefile index 12ab4c4..208af89 100644 --- a/Makefile +++ b/Makefile @@ -46,6 +46,8 @@ deps/secp256k1/include/secp256k1.h: deps/secp256k1/.git deps/secp256k1/configure: deps/secp256k1/.git cd deps/secp256k1; \ + automake --add-missing; \ + autoreconf; \ ./autogen.sh deps/secp256k1/config.log: deps/secp256k1/configure diff --git a/nostril.c b/nostril.c index 5bd279e..56e5f29 100644 --- a/nostril.c +++ b/nostril.c @@ -97,7 +97,7 @@ void usage() printf(" -e shorthand for --tag e \n"); printf(" -p shorthand for --tag p \n"); printf(" -t shorthand for --tag t \n"); - exit(1); + exit(0); }