Commit bfb9de20 authored by Yann Hodique's avatar Yann Hodique Committed by GitHub

fix(just): properly handle multiple tags (#13734)

* fix(just): properly handle multiple tags

* chore(just): rename just/ -> justfiles/

The current behavior is confusing for people who don't have `just`
installed: instead of a recognizable "command not found", they could
see a "Permission denied" (if . is in the PATH I suppose).
parent 0d705b1a
# provide JUSTFLAGS for just-backed targets
include ./just/flags.mk
include ./justfiles/flags.mk
BEDROCK_TAGS_REMOTE?=origin
OP_STACK_GO_BUILDER?=us-docker.pkg.dev/oplabs-tools-artifacts/images/op-stack-go:latest
......
......@@ -6,13 +6,13 @@ GITDATE := env('GITDATE', `git show -s --format='%ct' 2> /dev/null|| true`)
_PROJECT := shell("basename $1", justfile_directory())
_ALL_TAGS := shell("git tag --points-at $1 2> /dev/null || true", GITCOMMIT)
_ALL_TAGS := shell("git tag --sort=creatordate --points-at $1 2> /dev/null || true", GITCOMMIT)
_PROJECT_TAGS := shell("echo $1 | grep ^$2/ | sed s:$2/:: | sort -V", _ALL_TAGS, _PROJECT)
_PROJECT_TAGS := shell("echo $1 | grep ^$2/ | tr ' ' '\n' | sed s:$2/:: | sort -V", _ALL_TAGS, _PROJECT)
_PREFERRED_TAG := shell("echo $1 | grep -v -- '-rc' | tail -n 1", _PROJECT_TAGS)
_PREFERRED_TAG := shell("echo $1 | tr ' ' '\n' | grep -v -- '-rc' | tail -n 1", _PROJECT_TAGS)
_LAST_TAG := shell("echo $1 | tail -n 1", _PROJECT_TAGS)
_LAST_TAG := shell("echo $1 | tr ' ' '\n' | tail -n 1", _PROJECT_TAGS)
# Find version tag, prioritizing non-rc release tags
VERSION := shell('if [ -z "$1" ]; then
......
DEPRECATED_TARGETS := da-server clean test
include ../just/deprecated.mk
include ../justfiles/deprecated.mk
import '../just/go.just'
import '../justfiles/go.just'
# Build ldflags string
_LDFLAGSSTRING := "'" + trim(
......
DEPRECATED_TARGETS := op-batcher clean test fuzz
include ../just/deprecated.mk
include ../justfiles/deprecated.mk
import '../just/go.just'
import '../justfiles/go.just'
# Build ldflags string
_LDFLAGSSTRING := "'" + trim(
......
DEPRECATED_TARGETS := ecotone-scalar receipt-reference-builder test op-deployer fuzz sync-standard-version
include ../just/deprecated.mk
include ../justfiles/deprecated.mk
import '../just/go.just'
import '../justfiles/go.just'
# Build ldflags string
_VERSION_META_STR := if VERSION_META != "" { "+" + VERSION_META } else { "" }
......
DEPRECATED_TARGETS := op-challenger clean test fuzz visualize
include ../just/deprecated.mk
include ../justfiles/deprecated.mk
import '../just/go.just'
import '../justfiles/go.just'
# Build ldflags string
_VERSION_META_STR := if VERSION_META != "" { "+" + VERSION_META } else { "" }
......
DEPRECATED_TARGETS := op-conductor clean test generate-mocks
include ../just/deprecated.mk
include ../justfiles/deprecated.mk
import '../just/go.just'
import '../justfiles/go.just'
# Build ldflags string
_LDFLAGSSTRING := "'" + trim(
......
DEPRECATED_TARGETS := op-dispute-mon clean test
include ../just/deprecated.mk
include ../justfiles/deprecated.mk
import '../just/go.just'
import '../justfiles/go.just'
# Build ldflags string
_LDFLAGSSTRING := "'" + trim(
......
DEPRECATED_TARGETS := op-node clean test fuzz generate-mocks readme
include ../just/deprecated.mk
include ../justfiles/deprecated.mk
import '../just/go.just'
import '../justfiles/go.just'
# Build ldflags string
_LDFLAGSSTRING := "'" + trim(
......
DEPRECATED_TARGETS := op-proposer clean test
include ../just/deprecated.mk
include ../justfiles/deprecated.mk
import '../just/go.just'
import '../justfiles/go.just'
# Build ldflags string
_LDFLAGSSTRING := "'" + trim(
......
DEPRECATED_TARGETS := test generate-mocks fuzz
include ../just/deprecated.mk
include ../justfiles/deprecated.mk
import '../just/go.just'
import '../justfiles/go.just'
# Run tests
test: (go_test "./...")
......
DEPRECATED_TARGETS := op-supervisor clean test
include ../just/deprecated.mk
include ../justfiles/deprecated.mk
import '../just/go.just'
import '../justfiles/go.just'
# Build ldflags string
_LDFLAGSSTRING := "'" + trim(
......
DEPRECATED_TARGETS := op-wheel
include ../just/deprecated.mk
include ../justfiles/deprecated.mk
import '../just/go.just'
import '../justfiles/go.just'
# Build ldflags string
_LDFLAGSSTRING := "'" + trim(
......
......@@ -20,5 +20,5 @@
!/op-alt-da
!/go.mod
!/go.sum
!/just
!/justfiles
!/mise.toml
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment