Мы используем 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
🌎 Glowing deep-sea animals like the comb jellyfish and dragonfish create their own light using bioluminescence. This adaptation helps them hunt, attract mates, or avoid predators in pitch-black ocean depths. Some dragonfish possess "invisible" red bioluminescence, seen only by their own kind, for stealthy communication. ✨
#ocean⚡#animals⚡#bioluminescence
👉subscribe Interesting Planet
👉more Channels
🌍 The Waitomo Glowworm Caves in New Zealand are famous for thousands of tiny insects that light up the darkness, creating a galaxy-like effect in this unique karst underground world. ✨
#caves⚡#karst⚡#bioluminescence⚡#geography⚡#nature⚡#earth
👉subscribe Amazing Geography
👉more Channels
🌎 Shrouded in darkness, the “midnight zone” of the ocean lies below 1,000 meters, where sunlight can’t reach and pressure crushes like a dozen elephants. Creatures here glow with bioluminescence and withstand freezing cold, revealing how life adapts to our planet’s most mysterious depths. ✨
#ocean⚡#bioluminescence⚡#deepsea
👉subscribe Interesting Planet
🌎 Lightning bugs, or fireflies, create their glow through a special enzyme called luciferase. This reaction produces cold light, wasting almost no energy as heat—a marvel of natural engineering for nighttime signaling. ✨
#bioluminescence⚡#insects⚡#nature
👉subscribe Interesting Planet
🌎 Glowing tides known as bioluminescent bays light up in places like Puerto Rico. Microorganisms called dinoflagellates produce blue-green light when stirred by waves or movement. The brightest, Mosquito Bay, can host up to 700,000 glowing organisms in just one liter of water. ✨
#bioluminescence⚡#ocean⚡#phenomenon
👉subscribe Interesting Planet
👉more Channels
🌍 Some coasts shine with glowing “blue waves” at night, caused by tiny plankton called dinoflagellates emitting light when disturbed—a dazzling phenomenon known as marine bioluminescence. ✨
#seas⚡#coastline⚡#bioluminescence⚡#geography⚡#nature⚡#earth
👉subscribe Amazing Geography
👉more Channels
🌎 Glowing waves known as “sea sparkle” can light up coastlines at night. This effect is caused by bioluminescent plankton emitting blue light when disturbed. Some blooms stretch for kilometers and are most often seen in warm coastal waters. ✨
#bioluminescence⚡#ocean⚡#plankton
👉subscribe Interesting Planet
👉more Channels
🌎 Glowing waves sometimes light up the ocean at night thanks to bioluminescent plankton. These tiny marine organisms emit blue light when disturbed, turning shorelines into breathtaking, natural light shows. ✨
#ocean⚡#bioluminescence⚡#plankton
👉subscribe Interesting Planet
🌎 The vampire squid thrives in the ocean’s dark depths by using bioluminescent light organs to confuse predators. Its name comes from its cloak-like webbed arms, not from blood-drinking. ✨
#ocean⚡#cephalopod⚡#bioluminescence
👉subscribe Interesting Planet
🌎 In the Mediterranean Sea, the bearded fireworm boasts bristly, glowing spines that can cause a painful sting. This marine worm’s bioluminescence warns predators while its venomous bristles deter unwelcome touches—a perfect example of nature’s flashy, double-edged defense system. ✨
#fireworm⚡#bioluminescence⚡#ocean
👉subscribe Interesting Planet
🌎 Somewhere in the world’s oceans, the “milky sea” phenomenon can make water glow bright blue for up to several days. Caused by massive colonies of bioluminescent bacteria, these rare glowing patches can cover areas larger than 15,000 square kilometers—visible even from space. ✨
#ocean⚡#mysteries⚡#bioluminescence⚡#bacteria
👉subscribe Interesting Planet