-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathMakefile
More file actions
54 lines (45 loc) · 1.64 KB
/
Makefile
File metadata and controls
54 lines (45 loc) · 1.64 KB
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
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
# Makefile for project setup and execution
# Define the output file for the bundled Lua
OUTPUT_FILE=process.lua
setup:
@echo "Setting up the environment..."
@if [ "$(shell uname)" = "Darwin" ]; then \
/bin/bash -c "$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/HEAD/install.sh)"; \
brew install luarocks; \
curl -o- https://raw.githubusercontent.com/nvm-sh/nvm/v0.39.0/install.sh | bash; \
export NVM_DIR="$$HOME/.nvm"; \
[ -s "$$NVM_DIR/nvm.sh" ] && . "$$NVM_DIR/nvm.sh"; \
nvm install; \
nvm use; \
elif [ "$(shell uname)" = "Linux" ]; then \
sudo apt-get update; \
sudo apt-get install -y luarocks; \
rm -rf luarocks-3.11.1/; \
rm -f luarocks.tar.gz; \
curl -o- https://raw.githubusercontent.com/nvm-sh/nvm/v0.39.0/install.sh | bash; \
export NVM_DIR="$$HOME/.nvm"; \
[ -s "$$NVM_DIR/nvm.sh" ] && . "$$NVM_DIR/nvm.sh"; \
nvm install; \
nvm use; \
else \
echo "Please follow the instructions in docs/misc/install_npm.md and docs/misc/install_luarocks.md for your OS."; \
fi
# Define the target for installing dependencies
# Installing Lua dependencies to lib.
# Installing Node dependencies to node_modules.
# Intalling AO
install:
sudo luarocks install --tree=lib --only-deps arcao-process-template-1.0-1.rockspec
sudo luarocks install --only-deps arcao-process-template-1.0-1.rockspec
sudo npm install
sudo npm i -g https://get_ao.g8way.io
# Define the target for setting up the environment
# Define the target for running the node script
build:
node bundle.js $(OUTPUT_FILE)
# Define the target for running tests
test:
sudo busted --verbose
deploy:
bash deploy.sh
.PHONY: build install test setup deploy