Мы используем Makefile думая, что нет альтернатив, что это стандарт и всё такое.
Но make это не запускалка команд, а система сборки. Мы фактически используем его не по назначению.
И на самом деле альтернатива есть! Некоторое время назад я открыл для себя прекрасный инструмент - just. Он решает все проблемы make.
just - это не система сборки как make, это именно исполнитель команд!
Больше никаких Phony Targets и табуляций, привет нормальный синтаксис и передача аргументов!!! 😎
⭐️Что умеет just:
✅ Автодокументирование команд
Не нужно делать отдельную команду с докой, просто добавь комментарий
# команда сборки
build:
...
$ just --list
Available recipes:
build # команда сборки
Команда с именем default запускается по умолчанию если не указано другое, так что я обычно делаю так:
default:
just --list
Теперь просто выполняем just и получаем доку из текущего файла.
✅ Удобная работа с переменными окружения
# загрузить из .env
set dotenv-load
# глобальная переменная
export PYTHONPATH := "./src"
# переменная для команды
test $TESTUNG="true":
pytest
✅ Передача аргументов
build target:
@echo 'Build {{target}}...'
команда запуска
$ just build dev
# Build dev...
✅ Выбор интерпретатора прямо в команде
Пример с инлайн-скриптом на python:
system:
#!/usr/bin/env python3
import platform
print(platform.system())
Эта же функция позволит выполнить скрипт как одну команду вместо перезапуска шела для каждой строки
foo:
#!/usr/bin/env sh
for file in ls .; do
echo $file
done
✅ Выполнение команды в определенной директории. Можно указать как релятивный путь так и абсолютный
[working-directory: 'backend']
build:
docker compose build
Также можно задать рабочую директорию глобально
Там еще много интересного:
- поддержка функций
- автокомплиты и интеграции
- экспрешены
- алиасы команд
- группировка команд
- альтернативы команды под разные ОС
- импорт других just-файлов
- цветной вывод
- ... и другие штуковины!
Так что вперёд - ➡️ читать доку!
Репозиторий: ➡️https://github.com/casey/just
Статья: ➡️https://www.chicks.net/reference/file_formats/just/
ЗЫ. Кажется, на Makefile я уже не вернусь)
#tools
👍Только для гостей нашего стенда LIVE демонстрация и полный разбор возможностей V12 и V12 Pro
➡️Регистрируйтесь на выставку с промокодом RBA2025 для бесплатного входа!
#Русбизнесавто#Higer#AutoBusExpo#V12#V12Pro
🚗✨Introducing the Nilu Supercar by Alexander Selipanov!🔥
Designed for true driving enthusiasts, the Nilu is a masterpiece that strips away unnecessary electronics to deliver pure driving pleasure. 🏁💨
🔩Powerful Performance:
Equipped with a breathtaking atmospheric V12 engine producing 1070 hp, paired with a 7-speed manual transmission. This beast can reach a top speed of 400 km/h and accelerate from 0 to 100 km/h in under 3 seconds! ⚡️
⚙️Cutting-Edge Engineering:
Built on a carbon fiber monocoque with tubular subframes, featuring fully independent pushrod suspension and 21-inch wheels with carbon-ceramic brakes. 🛠️
🚢Exclusive Release:
Only 15 units will be produced for track enthusiasts, followed by another 54 road-ready models. Pricing details remain under wraps! 💰
#Nilu#Supercar#AlexanderSelipanov#DrivingPassion#V12#Auto
🚗✨ Introducing the new Aston Martin Vanquish with a powerful V12! 🌟
🔧 Equipped with a twin-turbo engine delivering an impressive 835 hp and 1000 Nm of torque (just edging out the Ferrari 12Cilindri at 830 hp)! 💪
⚡️ Accelerating from 0 to 60 mph (96 km/h) in just 3.2 seconds, this flagship beauty boasts a top speed of 344 km/h! 🏁
🛠️ The Vanquish features a brand new body with a 75% increase in stiffness compared to the DBS. It comes with carbon-ceramic brakes and cutting-edge Bilstein DTX adaptive dampers for an unparalleled driving experience! 🚀
📅 Deliveries of this grand tourer will begin in Q4, with a starting price of $420,000. 💰
#AstonMartin#Vanquish#V12#LuxuryCars#Performance#CarEnthusiasts#Supercar#DrivingExperience#Auto
🚗💨 Exciting news from the German tuning atelier DMC! They've unveiled the first tuning kit for the stunning Lamborghini Revuelto! 🌟
This incredible kit features:
✨ Two different rear wings
✨ An alternative diffuser
✨ Side skirt overlays
✨ New side mirror housings
The stock V12 engine delivers a jaw-dropping 1015 horsepower, but with DMC's modifications to the exhaust system and engine control unit, it now boasts an impressive 1099 horsepower! 🔥💪
And here's a twist: all parts from the kit will be available for purchase exclusively in Bitcoin! 💰💻
#Lamborghini#Revuelto#DMC#Tuning#Supercar#V12#Performance#Bitcoin#LuxuryCars#Auto
🚗✨SPOTTED: The Last Longtail Supercar - Pagani Huayra Codalunga!🌟
This stunning masterpiece, crafted in collaboration with the French luxury house Hermès, is one of only five ever made, each priced at a jaw-dropping €7 million! 💰💎
Inspired by the longtail sport prototypes of the 1960s, this special edition features an elongated rear and ditches the rear wing for a sleek design. The Mercedes-AMG V12 has been fine-tuned to deliver an astonishing 840 hp and 1100 Nm of torque! 🔥⚙️
A true work of art on wheels! 🖼️❤️
#Pagani#HuayraCodalunga#LuxuryCars#Supercar#CarSpotting#AutomotiveArt#Hermes#V12#CarEnthusiast#ExoticCars#Auto🚀🌍