Мы используем 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
🌎 In Slovenia, the Postojna Cave harbors a rare blind amphibian called the olm, which can live without food for up to 10 years. The cave stretches over 24 kilometers and contains vast chambers, underground rivers, and prehistoric animal remains. ✨
#geology⚡#caves⚡#biodiversity
👉subscribe Interesting Planet
👉more Channels
🌎 Beneath Borneo’s limestone hills, the Clearwater Cave system spans over 237 kilometers, making it one of the world’s largest interconnected cave networks. Its underground river flows for 11 kilometers, supporting unique species like blind catfish and swiftlets that nest in its dark chambers. ✨
#caves⚡#geology⚡#biodiversity
👉subscribe Interesting Planet
👉more Channels
🌎 The world’s deepest cave, Veryovkina Cave in Georgia, plunges to 2,212 meters below the surface. Its vertical shafts, tight squeezes, and frigid underground streams challenge expert cavers. Specially adapted crustaceans and fungi live in total darkness at these extreme depths. ✨
#caves⚡#geology⚡#biodiversity
👉subscribe Interesting Planet
👉more Channels
🌎 In Croatia’s Velebit Mountains, the Lukina Jama–Trojama cave system plunges over 1,431 meters deep, housing rare leech species and tiny amphipods. Exploring these deep caves requires specialized rope techniques and careful study of underground water flows, revealing new life forms adapted to total darkness and isolation. ✨
#caves⚡#biodiversity⚡#geology
👉subscribe Interesting Planet
🌎 Deep beneath Venezuela, the Cueva del Fantasma cave is so massive that helicopters can fly inside. These vast underground chambers shelter unique bats, insects, and even entire ecosystems far from sunlight. ✨
#caves⚡#geology⚡#biodiversity
👉subscribe Interesting Planet
🌎 The world’s largest crystal cave, Cueva de los Cristales in Mexico, holds giant selenite crystals that measure up to 12 meters long. These crystals formed over 500,000 years in intense heat and humidity more than 300 meters below the surface. ✨
#minerals⚡#geology⚡#caves
👉subscribe Interesting Planet
👉more Channels
🌎 Deep inside Lechuguilla Cave in New Mexico, explorers have found rare mineral formations called "subaqueous helictites." These twisted crystals form underwater from mineral-rich drips, creating shapes never seen elsewhere. The cave stretches over 248 kilometers, making it one of the longest surveyed caves in the world. ✨
#geology⚡#caves⚡#minerals
👉subscribe Interesting Planet
👉more Channels
🌎 Deep within Mexico’s Cave of Swallows, birds plunge over 370 meters in freefall—a vertical drop so vast, entire skyscrapers could fit inside. This limestone sinkhole is among the world’s largest cave shafts, showcasing nature’s dramatic underground architecture. ✨
#geology⚡#birds⚡#caves
👉subscribe Interesting Planet
🌎 Salt crystals can form “cave chandeliers” in arid underground lakes. These sparkling formations grow when salty water evaporates, leaving dazzling, fragile mineral structures hanging from cave ceilings. ✨
#geology⚡#caves⚡#minerals
👉subscribe Interesting Planet
🌎 Hidden deep beneath the Yucatán Peninsula in Mexico, the Sistema Sac Actun is the world’s longest underwater cave system. Stretching over 370 kilometers, these flooded limestone tunnels were formed by rainwater dissolving rock over thousands of years. Archaeologists have found ancient human and animal fossils preserved in the caves, including remains over 13,000 years old. ✨
#caves⚡#archaeology⚡#fossils
👉subscribe Interesting Planet
👉more Channels
🌎 Deep inside Mexico’s Naica Mine, giant crystals of gypsum grow in the Cave of the Crystals, reaching up to 11 meters long. The cave’s extreme heat—up to 58°C—and high humidity make exploration challenging, and the crystals formed over at least 500,000 years in mineral-rich underground water. ✨
#caves⚡#crystals⚡#geology
👉subscribe Interesting Planet
🌍 Slovenia’s Škocjan Caves feature an underground canyon over 100 meters deep—the largest in Europe. This karst wonder drains rivers directly from the surface into vast hidden chambers. ✨
#caves⚡#karst⚡#geology⚡#geography⚡#nature⚡#earth
👉subscribe Amazing Geography
👉more Channels