-
Notifications
You must be signed in to change notification settings - Fork 13
/
Makefile
38 lines (28 loc) · 1.33 KB
/
Makefile
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
.PHONY: install test-keys build start test clean-test-keys stop
TEST_KEY := $(shell solana-keygen pubkey ./tests/test-key.json)
all: install test-keys build start test clean-test-keys stop
install:
yarn install
test-keys:
anchor build
LC_ALL=C find programs src -type f -exec sed -i '' -e "s/genSsTXZaAGH1kRUe74TXzwuernqZhJksHvpXiAxBQT/$$(solana-keygen pubkey ./target/deploy/solana_nft_programs_generator-keypair.json)/g" {} +
anchor build
build:
anchor build
yarn idl:generate
start:
solana-test-validator --url https://api.devnet.solana.com \
--clone metaqbxxUerdq28cj1RbAWkYQm3ybzjb6a8bt518x1s --clone PwDiXFxQsGra4sFFTT8r1QWRMd4vfumiWC1jfWNfdYT \
--bpf-program ./target/deploy/solana_nft_programs_generator-keypair.json ./target/deploy/solana_nft_programs_generator.so \
--reset --quiet & echo $$! > validator.PID
sleep 5
solana-keygen pubkey ./tests/test-key.json
solana airdrop 1000 $(TEST_KEY) --url http://localhost:8899
deploy:
anchor deploy --provider.cluster localnet
test:
anchor test --skip-local-validator --skip-build --skip-deploy --provider.cluster localnet
clean-test-keys:
LC_ALL=C find programs src -type f -exec sed -i '' -e "s/$$(solana-keygen pubkey ./target/deploy/solana_nft_programs_generator-keypair.json)/genSsTXZaAGH1kRUe74TXzwuernqZhJksHvpXiAxBQT/g" {} +
stop: validator.PID
pkill solana-test-validator