Мы используем 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
Myth: The tongue is divided up into specific areas that are solely responsible for sensing certain tastes (e.g., sweet at the tip, bitter at the back)
Fact: The tongue's receptor cells that identify the molecules underlying the basic tastes (sweet, sour, salt, bitter and umami) are distributed on taste buds all over the tongue although some areas may be slightly more sensitive to certain flavors..
@googlefactss#humanbody#nowyouknow#mythbusted
[read more...]
People think hair and nails grow after death, but it’s an optical illusion: as skin dehydrates and shrinks, nails and hair look longer — No actual postmortem growth happens.
[Learn more]
@googlefactss
#Forensics#MythBusted
Myth: Glass flows over time, making old windows thicker at the bottom.
Fact: Glass is an amorphous solid, meaning its atoms are arranged randomly, not in a pattern like crystals. It stays solid at all normal temperatures and only softens above 600°C (1112°F). Old windows are thicker at the bottom because of how they were made, not because glass moves. 🔥🌡️
[Read more]
@googlefactss
#GlassFacts#Science#MythBusted#Heat
Viking helmets with horns are -mostly- a myth. Only one authentic Viking helmet exists, without horns. Horned helmets appear in art linked to berserkers—fierce warriors who likely wore them for rituals, not battle. Horns would be impractical in combat, and no historical records mention Vikings wearing them. Real Viking helmets were simple and functional. ⚔️🛡️
[More🪖]
@googlefactss
#Vikings#History#MythBusted#Berserkers#Archaeology
❄️ Hot water does NOT freeze faster than cold water.
While a rare phenomenon called the Mpemba effect suggests it can happen under specific conditions, cold water almost always freezes first.
[Source]
This post is a correction for another one we posted in the past [here]
@googlefactss#Science#Physics#WaterFreezing#MpembaEffect#MythBusted
The idea that skinny people have fast metabolisms is a myth. Metabolism depends largely on muscle mass—more muscle means higher energy use. Skinny people usually have less muscle, so their metabolism is often slower. Weight and appearance don’t reliably show metabolism speed.
[Read more]
@googlefactss
#Metabolism#MythBusted#Health#Fitness#BodyScience
Myth: opposums sleep while hanging by their tails.
Fact: Opossums do not hang upside down by their tails 🐾. Their tails are strong for gripping branches and carrying nesting materials but can’t hold their full weight for long. Young opossums might dangle briefly but don’t sleep that way. They “play possum” by pretending to be dead when scared, which helps protect them from predators.
🌙🐾🌳
[Read more]
@googlefactss#PossumFacts#AnimalBehavior#NatureFacts#MythBusted#DisneyWasWrong