Add steps to create glob for the app
This commit is contained in:
parent
39fc536562
commit
c2be02a06b
@ -22,9 +22,7 @@ services:
|
|||||||
command: ["./deploy-to-urbit.sh"]
|
command: ["./deploy-to-urbit.sh"]
|
||||||
volumes:
|
volumes:
|
||||||
- app_builds:/app-builds
|
- app_builds:/app-builds
|
||||||
- urbit_data:/urbit
|
|
||||||
- ../config/uniswap-interface/deploy-to-urbit.sh:/app/deploy-to-urbit.sh
|
- ../config/uniswap-interface/deploy-to-urbit.sh:/app/deploy-to-urbit.sh
|
||||||
|
|
||||||
volumes:
|
volumes:
|
||||||
app_builds:
|
app_builds:
|
||||||
urbit_data:
|
|
||||||
|
@ -4,7 +4,7 @@ services:
|
|||||||
urbit-fake-ship:
|
urbit-fake-ship:
|
||||||
restart: unless-stopped
|
restart: unless-stopped
|
||||||
image: tloncorp/vere
|
image: tloncorp/vere
|
||||||
entrypoint: ["bash", "-c", "./run-urbit-ship.sh && deploy-uniswap-app.sh"]
|
entrypoint: ["bash", "-c", "./run-urbit-ship.sh && ./deploy-uniswap-app.sh"]
|
||||||
volumes:
|
volumes:
|
||||||
- urbit_data:/urbit
|
- urbit_data:/urbit
|
||||||
- app_builds:/app-builds
|
- app_builds:/app-builds
|
||||||
|
@ -5,8 +5,15 @@ if [ -n "$CERC_SCRIPT_DEBUG" ]; then
|
|||||||
set -x
|
set -x
|
||||||
fi
|
fi
|
||||||
|
|
||||||
|
uniswap_app_build='/app-builds/uniswap/build'
|
||||||
uniswap_desk_dir='/urbit/zod/uniswap'
|
uniswap_desk_dir='/urbit/zod/uniswap'
|
||||||
|
|
||||||
|
if [ -d ${uniswap_desk_dir} ]; then
|
||||||
|
echo "Uniswap desk dir already exists, exiting"
|
||||||
|
exit 0
|
||||||
|
fi
|
||||||
|
|
||||||
|
# Fire curl requests to perform operations on the ship
|
||||||
dojo () {
|
dojo () {
|
||||||
curl -s --data '{"source":{"dojo":"'"$1"'"},"sink":{"stdout":null}}' http://localhost:12321
|
curl -s --data '{"source":{"dojo":"'"$1"'"},"sink":{"stdout":null}}' http://localhost:12321
|
||||||
}
|
}
|
||||||
@ -15,46 +22,80 @@ hood () {
|
|||||||
curl -s --data '{"source":{"dojo":"+hood/'"$1"'"},"sink":{"app":"hood"}}' http://localhost:12321
|
curl -s --data '{"source":{"dojo":"+hood/'"$1"'"},"sink":{"app":"hood"}}' http://localhost:12321
|
||||||
}
|
}
|
||||||
|
|
||||||
# Fire curl requests to create/mount a uniswap desk
|
# Create/mount a uniswap desk
|
||||||
curl -s --data '{"source":{"dojo":"+hood/merge %uniswap our %landscape"},"sink":{"app":"hood"}}' http://localhost:12321
|
hood "merge %uniswap our %landscape"
|
||||||
hood "mount %uniswap"
|
hood "mount %uniswap"
|
||||||
|
|
||||||
tail -f /dev/null
|
# Loop until the uniswap build appears
|
||||||
|
while [ ! -d ${uniswap_app_build} ]; do
|
||||||
|
echo "Uniswap app build not found, retrying in 5s..."
|
||||||
|
sleep 5
|
||||||
|
done
|
||||||
|
echo "Build found..."
|
||||||
|
|
||||||
|
|
||||||
# Wait for uniswap build to appear
|
|
||||||
# Copy over build to desk data dir
|
# Copy over build to desk data dir
|
||||||
|
cp -r ${uniswap_app_build} ${uniswap_desk_dir}
|
||||||
|
|
||||||
# cat << EOF > file.txt
|
# Create a mark file for .map file type
|
||||||
# ::
|
cat << EOF > "${uniswap_desk_dir}/mar/map.hoon"
|
||||||
# :::: /hoon/map/mar
|
::
|
||||||
# :: Mark for js source maps
|
:::: /hoon/map/mar
|
||||||
# /? 310
|
:: Mark for js source maps
|
||||||
# ::
|
/? 310
|
||||||
# =, eyre
|
::
|
||||||
# |_ mud=@
|
=, eyre
|
||||||
# ++ grow
|
|_ mud=@
|
||||||
# |%
|
++ grow
|
||||||
# ++ mime [/application/octet-stream (as-octs:mimes:html (@t mud))]
|
|%
|
||||||
# --
|
++ mime [/application/octet-stream (as-octs:mimes:html (@t mud))]
|
||||||
# ++ grab
|
--
|
||||||
# |% :: convert from
|
++ grab
|
||||||
# ++ mime |=([p=mite q=octs] (@t q.q))
|
|% :: convert from
|
||||||
# ++ noun cord :: clam from %noun
|
++ mime |=([p=mite q=octs] (@t q.q))
|
||||||
# --
|
++ noun cord :: clam from %noun
|
||||||
# ++ grad %mime
|
--
|
||||||
# --
|
++ grad %mime
|
||||||
# EOF
|
--
|
||||||
|
EOF
|
||||||
|
|
||||||
# cp ~/zod/uniswap/mar/woff2.hoon ~/zod/uniswap/mar/woff.hoon and edit the only line that has woff2 to woff
|
# Create a mark file for .woff file type
|
||||||
# cp ~/zod/uniswap/mar/woff2.hoon ~/zod/uniswap/mar/ttf.hoon and edit woff2 to ttf
|
cat << EOF > "${uniswap_desk_dir}/mar/woff.hoon"
|
||||||
|
|_ dat=octs
|
||||||
|
++ grow
|
||||||
|
|%
|
||||||
|
++ mime [/font/woff dat]
|
||||||
|
--
|
||||||
|
++ grab
|
||||||
|
|%
|
||||||
|
++ mime |=([=mite =octs] octs)
|
||||||
|
++ noun octs
|
||||||
|
--
|
||||||
|
++ grad %mime
|
||||||
|
--
|
||||||
|
EOF
|
||||||
|
|
||||||
# rm ~/zod/uniswap/desk.bill
|
# Create a mark file for .ttf file type
|
||||||
# rm ~/zod/uniswap/desk.ship
|
cat << EOF > "${uniswap_desk_dir}/mar/ttf.hoon"
|
||||||
|
|_ dat=octs
|
||||||
|
++ grow
|
||||||
|
|%
|
||||||
|
++ mime [/font/ttf dat]
|
||||||
|
--
|
||||||
|
++ grab
|
||||||
|
|%
|
||||||
|
++ mime |=([=mite =octs] octs)
|
||||||
|
++ noun octs
|
||||||
|
--
|
||||||
|
++ grad %mime
|
||||||
|
--
|
||||||
|
EOF
|
||||||
|
|
||||||
# |commit %uniswap
|
rm "${uniswap_desk_dir}/desk.bill"
|
||||||
|
rm "${uniswap_desk_dir}/desk.ship"
|
||||||
|
|
||||||
# -landscape!make-glob %uniswap /build
|
# Commit changes and create a glob
|
||||||
|
hood "commit %uniswap"
|
||||||
|
dojo "-landscape!make-glob %uniswap /build"
|
||||||
|
|
||||||
# Curl and wait for the glob to be hosted
|
# Curl and wait for the glob to be hosted
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user