Skip to content

Commit eb3e1a1

Browse files
Merge pull request #7 from bitcoincore-dev/v0.0.8
V0.0.8
2 parents 5a83b18 + fec50c5 commit eb3e1a1

File tree

6 files changed

+23
-14
lines changed

6 files changed

+23
-14
lines changed

Dockerfile

Lines changed: 2 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -10,15 +10,9 @@ RUN apt-get install systemd bash jq -y
1010
RUN echo $(date +%s) > updated
1111
RUN chmod +x /usr/bin/systemctl
1212
RUN echo $(date +%s) > updated
13-
FROM systemd as pandoc
14-
RUN apt-get install pandoc -y
15-
RUN echo $(date +%s) > updated
16-
FROM pandoc as docker
17-
RUN apt-get install docker.io -y
18-
RUN echo $(date +%s) > updated
19-
FROM docker as clone
13+
FROM systemd as clone
2014
RUN rm -rf /src
21-
RUN git clone --branch v0.0.7 --depth 1 https://github.com/bitcoincore-dev/miniscript-docker /src
15+
RUN git clone --branch v0.0.8 --depth 1 https://github.com/bitcoincore-dev/miniscript-docker /src
2216
RUN echo $(date +%s) > updated
2317
FROM clone as make
2418
WORKDIR /src

GNUmakefile

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -44,8 +44,9 @@ docker-miniscript:docker-build## docker-miniscript
4444
@[[ -z "$(shell file ./miniscript | grep inux)" ]] && echo "not linux" && rm ./miniscript || echo "miniscript is built for linux"
4545
@$(DOCKER) run --rm -v $(PWD):/src --publish 80:8080 miniscript sh -c "make install"
4646

47-
test:
48-
@bash $< $@.sh || $(MAKE) miniscript
47+
.PHONY:miniscript-tests
48+
miniscript-tests:## miniscript-tests
49+
@bash $< $@ 2>/dev/null || true
4950

5051
example-commands:
5152
@printf "\n"

Makefile

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
HEADERS := bitcoin/util/vector.h bitcoin/util/strencodings.h bitcoin/span.h bitcoin/util/spanparsing.h bitcoin/script/script.h bitcoin/script/miniscript.h compiler.h bitcoin/crypto/common.h bitcoin/serialize.h bitcoin/prevector.h bitcoin/compat/endian.h bitcoin/compat/byteswap.h bitcoin/attributes.h bitcoin/tinyformat.h bitcoin/primitives/transaction.h
22
SOURCES := bitcoin/util/strencodings.cpp bitcoin/util/spanparsing.cpp bitcoin/script/script.cpp bitcoin/script/miniscript.cpp compiler.cpp
33

4-
miniscript: $(HEADERS) $(SOURCES) main.cpp
4+
miniscript: $(HEADERS) $(SOURCES) main.cpp## miniscript
55
g++ -O3 -g0 -Wall -std=c++17 -march=native -flto -Ibitcoin $(SOURCES) main.cpp -o miniscript
66

77
miniscript.js: $(HEADERS) $(SOURCES) js_bindings.cpp

miniscript-test-0

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,3 @@
1+
#!/usr/bin/env bash
2+
JQ=$(which jq)
3+
echo "or_i(and_v(v:thresh(2,pkh(M1),a:pkh(M2),a:pkh(M3)),after(1005)),and_v(v:thresh(2,pk(P1),s:pk(P2),s:pk(P3),sun:after(1002),sun:after(1003)),and_v(or_c(pk(SA1),or_c(pk(SA3),v:pkh(SA2))),thresh(2,pk(A1),s:pk(A2),s:pk(A3),sln:after(1004)))))" | ./miniscript | $JQ || true

miniscript-tests

Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,14 @@
1+
#!/usr/bin/env bash
2+
3+
[[ -z "$(command -v miniscript-tests)" ]] && \
4+
install $0 /usr/local/bin || true
5+
## add your won tests
6+
## miniscript-test-0
7+
## miniscript-test-1000
8+
## etc..
9+
10+
TESTS=$(echo miniscript-test-{0..1000})
11+
for ms in $TESTS
12+
do
13+
. $ms 2>/dev/null
14+
done

test.sh

Lines changed: 0 additions & 3 deletions
This file was deleted.

0 commit comments

Comments
 (0)