Мы используем 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
🚗💨 Introducing the track-ready Cadillac CT5-V! 🎉
This powerful beast now features a Precision Package with enhanced suspension, including increased stiffness and reprogrammed adaptive dampers for an exhilarating ride on the track! 🏁✨
🔧 Key Highlights:
- Carbon-Ceramic Brakes for superior stopping power 🛑
- 6.2L V8 Engine producing an impressive 677 hp and 892 Nm of torque 💪🔥
- RWD for that ultimate driving experience!
Get ready to unleash the power! 💥
#CadillacCT5V#PrecisionPackage#TrackReady#V8Power#Auto
🚗✨Lexus Unveils Upgraded LC Coupe and Convertible!✨🚗
Since its debut in 2017, the Lexus LC family has received a sleek exterior makeover and new interior materials. But that's not all! The updated models now feature a stiffer chassis, thanks to additional braces installed under the floor near the front and rear axles, enhancing overall handling. 🏎️💨
Under the hood, the Lexus LC offers a powerful lineup: a 5.0L V8 engine producing 477 hp or a hybrid V6 powertrain with a 3.5L engine delivering 359 hp. 🔥🔋
#LexusLC#LuxuryCars#CarEnthusiast#DrivingExperience#AutoNews#V8Power#Auto
🌟 Exciting News for Supercar Enthusiasts! 🚗💨
The British have officially kicked off production of the stunning Ginetta Akula! 🦈✨
First unveiled in 2019, this masterpiece is limited to just 20 units, starting at £275,000. 💰
Featuring a classic design, the Akula boasts a powerful 6.4L V8 engine with 600 hp, paired with a manual transmission and rear-wheel drive. 🔥 Despite its robust engine, it weighs only 1.2 tons, accelerating from 0 to 100 km/h in just 2.9 seconds! ⚡️🏁 With a top speed of 290 km/h, this beauty is ready to roar!
Are you ready to experience the thrill? 😍
#GinettaAkula#Supercar#LimitedEdition#V8Power#CarEnthusiast#LuxuryCars#SpeedDemon#Auto
🚗💨 Introducing the BMW M5 Touring! 💨🚗
BMW has officially unveiled the stunning M5 in Touring body style!🌟
Under the hood, it boasts a powerful V8 twin-turbo engine with an impressive total output of 727 horsepower!🔥💪
With the rear seats folded down, you can fit a whopping 1.6 cubic meters of cargo! 🧳📦 And it can sprint from 0 to 100 km/h in just 3.6 seconds!⏱️⚡️
Weighing in at 2508 kg, this beauty is slightly heavier than its sedan counterpart. 🚙✨ This is only the third generation of the M5 in this body style and the first to hit the US market! 🇺🇸
Prices start at $121,500.💵
Get ready for an exhilarating ride! 🏁
#BMW#M5Touring#SportsCar#V8Power#LuxuryPerformance#CarEnthusiast#FastCars#Auto#BMWM🚘🌍
🚗💨 Dodge Unveils the "Farewell" Durango SRT Hellcat Silver Bullet! 💨🚗
This stunning special edition is one of the last to feature the powerful 6.2-liter HEMI V8 engine. As we bid farewell to these muscle machines, the Durango will soon lose its mighty motors. 😢💔
The Silver Bullet edition stands out with its exclusive decor and rich standard features, starting at $113,325**—about **$11,000 more than the previous year's base Durango Hellcat! 💰✨
Get ready to say goodbye to an icon!
#Dodge#DurangoSRT#Hellcat#SilverBullet#MuscleCar#Auto#V8Power#SUV🏁🔥
🚗💨 Introducing the Naran Hypercar: The Ultimate Powerhouse! 🌟
Get ready for the unveiling of the Naran Hypercar in the UK this August! 🇬🇧 With a staggering 1000 horsepower, this beast promises to be the fastest four-seater car in the world, powered by a traditional internal combustion engine—no electric enhancements! ⚡️❌
Only 39 units will be produced, making it an exclusive masterpiece! 🎨✨
Under the hood, it features a 5.0-liter twin-turbo V8, derived from BMW's impressive 4.4-liter engine. 🏎️💥 And yes, it comes with full-wheel drive for that ultimate driving experience! 🌍🚀
#NaranHypercar#CarEnthusiasts#AutomotiveExcellence#V8Power#Hypercar#FastestCar#LuxuryCars#CarLovers#InnovativeEngineering
🚗💨 Introducing the Ford F-150 FP700S! 🎉
Get ready for the ultimate asphalt beast! 🔥 With a powerful 700-horsepower V8 engine, this custom pickup is designed for performance and style.
🔧 Key Features:
• Supercharged 5.0L V8 with Whipple blower 💥
• Sporty exhaust system for that perfect roar 🎶
• Lowered suspension with new shocks for enhanced handling 🏎️
• Stunning 22-inch wheels for a bold look 🛞
• Aerodynamic body elements to slice through the air ✈️
#FordF150#FP700S#CustomGarage#PerformanceTruck#V8Power#AsphaltBeast#FordTuning#Auto
🚗✨ Exciting News from Mercedes-Maybach! ✨🚗
Get ready for the debut of the stunning new convertible on August 15th at the prestigious Pebble Beach! 🌊🏖️
The highly anticipated model has been teased since 2022, and we can't wait to see it in all its glory! 🤩
🔍 Fuel Efficiency: The Mercedes-Maybach SL boasts an impressive fuel consumption of 13.7 liters per 100 km*, closely matching the non-hybrid Mercedes-AMG SL 63 with its powerful 4.0L V8 engine, delivering a thrilling 585 hp and 800 Nm* of torque! 💨🔥
#MercedesMaybach#Convertible#LuxuryCars#PebbleBeach#CarDebut#FuelEfficiency#AMG#V8Power#Auto
🚗✨ Introducing the all-new AC Cobra GT Coupe! 🌟
For the first time in history, this iconic sports car is getting a hardtop version, and it's set to be produced in series! 🏁💨
With stunning carbon body panels, the Coupe is not only beautiful but also powerful! 💪🔥 Choose between two roaring V8 engines: 565 or 730 horsepower!
Starting at just £325,000, this masterpiece is ready to hit the roads! 💷🚀
#ACCobra#SportsCar#CarEnthusiast#LuxuryAutomobile#V8Power#CobraGT#CarLovers#IconicDesign#AutomotiveExcellence
🚗💨Introducing the Doughboy: A Mind-Blowing Restomod with 2838 HP!💥
At the SEMA Show, we unveiled a beast that redefines power and performance! 🔥 This incredible V8 engine boasts a staggering 8.8 liters of displacement and is equipped with dual turbochargers, pushing the limits of automotive engineering. 💪✨
🔧 With the engine strategically shifted 40 cm back towards the center of the wheelbase, every detail has been meticulously crafted from scratch, including the intake, exhaust, and cooling systems. 🛠️
💎 Custom parts were expertly created using CNC machining and 3D printing technology, showcasing innovation at its finest.
Get ready to experience the future of restomods! 🚀
#Doughboy#SEMA2023#Restomod#V8Power#Turbocharged#CarEnthusiast#AutomotiveInnovation#CustomCars#CNC#Auto