Skip to content

Commit

Permalink
chore(script): update script to pull src from repo, add gitignore
Browse files Browse the repository at this point in the history
  • Loading branch information
dtfiedler committed Feb 17, 2025
1 parent 477047b commit 86b3655
Show file tree
Hide file tree
Showing 3 changed files with 15 additions and 4 deletions.
6 changes: 5 additions & 1 deletion process/.gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -4,4 +4,8 @@ yarn.lock

# binaries
process.js
process.wasm
process.wasm

# ario src files
src/
state/
11 changes: 9 additions & 2 deletions process/publish.sh
Original file line number Diff line number Diff line change
@@ -1,13 +1,20 @@
#!/bin/bash
set -e

# Clone the ar-io-network-process repo and copy src directory
echo "Cloning ar-io-network-process repo..."
git clone -b mainnet-globals https://github.com/ar-io/ar-io-network-process.git tmp-ar-io
mkdir -p ./src
cp -r tmp-ar-io/src/* ./src/
rm -rf tmp-ar-io

# Step 1: Build the project
echo "Running: ao build"
ao build

# Step 2: Run tests
echo "Running: npm run test test/into.test.js"
npm run test test/into.test.js
echo "Running: npm run test test/info.test.js"
npm run test test/info.test.js

# Step 3: Publish and capture output
echo "Running: ao publish ... (capturing module ID)"
Expand Down
2 changes: 1 addition & 1 deletion process/test/info.test.js
Original file line number Diff line number Diff line change
Expand Up @@ -61,7 +61,7 @@ test('return process info', async () => {
Data: 'print("hello world")'
}
const result2 = await handle(result.Memory, msg2, env)
assert.ok(result2.Messages[0]?.Data)
assert.ok(result2.Output.data === 'hello world')
const msg3 = {
Target: 'AOS',
From: 'FOOBAR',
Expand Down

0 comments on commit 86b3655

Please # to comment.