Skip to content

Commit

Permalink
Fix version and build parameters when building taq using Homebrew
Browse files Browse the repository at this point in the history
  • Loading branch information
pinnacle-deren committed Oct 13, 2023
1 parent 6d14053 commit 3b1e7f1
Show file tree
Hide file tree
Showing 31 changed files with 118 additions and 111 deletions.
2 changes: 2 additions & 0 deletions HomebrewFormula/taqueria.rb
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,8 @@ class Taqueria < Formula
def install
# Append the path to npm to the PATH environment variable
ENV["PATH"] = "/usr/local/bin:#{ENV["PATH"]}"
ENV['TAQ_VERSION'] = '0.41.0'
ENV['TAQ_BUILD'] = '0.41.0'

# Install npm dependencies
system "npm install >/dev/null 2>&1"
Expand Down
2 changes: 1 addition & 1 deletion bin/build.sh
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@ if [ "$0" == "./bin/build.sh" -a -f index.ts ]; then
else
TARGET_ARG="--target $DENO_TARGET"
fi
deno compile -o taq --unstable --allow-run --allow-write --allow-read --allow-env --allow-net --import-map ./import_map.json --no-prompt index.ts $TARGET_ARG --setBuild "$BUILD" --setVersion "$TAQ_VERSION"
deno compile -o taq --unstable --allow-run --allow-write --allow-read --allow-env --allow-net --import-map ./import_map.json --no-prompt index.ts $TARGET_ARG --setBuild "$TAQ_BUILD" --setVersion "$TAQ_VERSION"
fi
else
echo "Usage: ./bin/build.sh"
Expand Down
4 changes: 2 additions & 2 deletions bin/debug.sh
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,6 @@ source ./bin/set-vars.sh
BIN_DIR="$( cd -- "$( dirname -- "${BASH_SOURCE[0]:-$0}"; )" &> /dev/null && pwd 2> /dev/null; )";
PROJ_DIR="${BIN_DIR}/.."

echo $BUILD
echo $TAQ_BUILD
echo $TAQ_VERSION
deno run --inspect-brk --unstable --allow-run --allow-write --allow-read --allow-env --allow-net --import-map "${PROJ_DIR}/import_map.json" "${PROJ_DIR}/index.ts" --setBuild "$BUILD" --setVersion "$TAQ_VERSION" $@
deno run --inspect-brk --unstable --allow-run --allow-write --allow-read --allow-env --allow-net --import-map "${PROJ_DIR}/import_map.json" "${PROJ_DIR}/index.ts" --setBuild "$TAQ_BUILD" --setVersion "$TAQ_VERSION" $@
2 changes: 1 addition & 1 deletion bin/run.sh
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ BIN_DIR="$( cd -- "$( dirname -- "${BASH_SOURCE[0]:-$0}"; )" &> /dev/null && pwd
PROJ_DIR="${BIN_DIR}/.."

if [ "$0" == "./bin/run.sh" -a -f index.ts ]; then
deno run --allow-run --unstable --allow-write --allow-read --allow-env --allow-net --import-map "${PROJ_DIR}/import_map.json" index.ts --setBuild "$BUILD" --setVersion "$TAQ_VERSION" $@
deno run --allow-run --unstable --allow-write --allow-read --allow-env --allow-net --import-map "${PROJ_DIR}/import_map.json" index.ts --setBuild "$TAQ_BUILD" --setVersion "$TAQ_VERSION" $@
else
echo "Usage: ./bin/build.sh"
echo "(please run from within project root)"
Expand Down
19 changes: 12 additions & 7 deletions bin/set-vars.sh
Original file line number Diff line number Diff line change
@@ -1,11 +1,16 @@
#!/usr/bin/env bash
BRANCH=`git branch --show-current`
COMMIT=`git rev-parse --short HEAD`
if [ -z "$GITHUB_REF_NAME" ]; then
TAQ_VERSION="dev-${BRANCH//\//-}"
else
if [ -z "$TAQ_VERSION" ]; then
if [ -z "$GITHUB_REF_NAME" ]; then
BRANCH=`git branch --show-current`
TAQ_VERSION="dev-${BRANCH//\//-}"
else

TAQ_VERSION=$(cat package.json | jq -r '.["version"]')
TAQ_VERSION=$(cat package.json | jq -r '.["version"]')
fi
fi
TIMESTAMP=`date +%s`
BUILD="$COMMIT"

if [ -z "$TAQ_BUILD" ]; then
COMMIT=`git rev-parse --short HEAD`
TAQ_BUILD="$COMMIT"
fi
2 changes: 1 addition & 1 deletion lerna.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"$schema": "node_modules/lerna/schemas/lerna-schema.json",
"version": "0.41.18",
"version": "0.41.19",
"packages": [
"taqueria-protocol",
"taqueria-lib*",
Expand Down
100 changes: 50 additions & 50 deletions package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "@taqueria/root",
"version": "0.41.18",
"version": "0.41.19",
"description": "An easy to use opinionated tool for building, testing, and deploying Tezos software",
"main": "index.ts",
"directories": {
Expand Down
Loading

0 comments on commit 3b1e7f1

Please sign in to comment.