Мы используем 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
🪐 Some of the most unusual stars in the universe are "blue stragglers," like those found in the globular cluster M30. Blue stragglers appear younger and hotter than neighboring stars in their ancient cluster, likely because they formed when two stars merged or stole material from a companion—making them stand out as apparent "youngsters" among a population of stellar elders. ✨
#stars⚡#mergers⚡#clusters⚡#nasa⚡#galaxy⚡#astronomy⚡#universe⚡#cosmos⚡#space
👉subscribe Universe Mysteries
👉more Channels
🪐 The galaxy cluster Abell 2142, located over 1 billion light-years away, is home to one of the largest shock waves ever spotted in the universe—a cosmic "sound wave" stretching millions of light-years through intergalactic gas. This shock wave, observed in X-ray light, is created as entire clusters of galaxies collide and merge, causing hot gas to ripple and heat up on truly enormous scales. ✨
#phenomena⚡#galaxies⚡#clusters⚡#nasa⚡#galaxy⚡#stars⚡#astronomy⚡#universe⚡#cosmos⚡#space
👉subscribe Universe Mysteries
👉more Channels
🪐 The James Webb Space Telescope has detected the earliest-known galaxy cluster, named "El Gordo," not as it appears today but as it looked over 10 billion years ago, still forming in the young universe. Webb’s powerful infrared vision allowed astronomers to spot dozens of galaxies caught in the act of merging, giving us a rare glimpse into how the first massive clusters assembled from smaller groups billions of years before our Milky Way even existed. ✨
#galaxies⚡#clusters⚡#webb⚡#nasa⚡#galaxy⚡#stars⚡#astronomy⚡#universe⚡#cosmos⚡#space
👉subscribe Universe Mysteries
👉more Channels
🪐 In the southern constellation Norma, the galaxy cluster Abell 3627 glows with "radio relics"—giant arcs of radio emission stretching millions of light-years across space. These relics are formed by shock waves traveling through the cluster’s hot gas, energizing particles to near-light speeds, and producing mysterious, ghostly signals that light up the cosmic web between galaxies. ✨
#phenomena⚡#clusters⚡#radio⚡#nasa⚡#galaxy⚡#stars⚡#astronomy⚡#universe⚡#cosmos⚡#space
👉subscribe Universe Mysteries
🪐 In 2011, researchers using the Chandra X-ray Observatory observed the galaxy cluster Abell 2029, where the massive central galaxy produces a ripple in the hot gas around it—a direct result of gravitational space-time distortion. The giant mass of the galaxy and its dark matter bends and stretches space, allowing astronomers to map how real, invisible warps affect the X-rays we detect, turning clusters like Abell 2029 into natural laboratories for exploring the true shape of space itself. ✨
#wormholes⚡#spacetime⚡#clusters⚡#nasa⚡#galaxy⚡#stars⚡#astronomy⚡#universe⚡#cosmos⚡#space
👉subscribe Universe Mysteries
👉more Channels
🪐 In the galaxy cluster Abell 1689, astronomers have observed light from distant galaxies being bent and stretched in strange ways—a real effect called "gravitational lensing." This phenomenon is caused when a huge mass, like the dense collection of galaxies in Abell 1689, distorts space-time itself—warping the paths of light and creating the illusion of arcs, rings, or even multiple images of the same object in the sky. ✨
#spacetime⚡#lensing⚡#clusters⚡#nasa⚡#galaxy⚡#stars⚡#astronomy⚡#universe⚡#cosmos⚡#space
👉subscribe Universe Mysteries
🪐 Located in the constellation Centaurus, the galaxy NGC 4696 is surrounded by ghostly, thread-like filaments of cool gas that twist and loop for tens of thousands of light-years. These strange structures glow softly as they snake through the much hotter, X-ray-bright plasma of the galaxy cluster core, and scientists believe they are shaped by magnetic fields and slow, turbulent flows—creating some of the most fantastical patterns seen in the cosmos. ✨
#phenomena⚡#filaments⚡#clusters⚡#nasa⚡#galaxy⚡#stars⚡#astronomy⚡#universe⚡#cosmos⚡#space
👉subscribe Universe Mysteries
👉more Channels
🪐 In the galaxy cluster Abell 2142, astronomers have observed gigantic, invisible boundaries called "cold fronts"—enormous walls of gas as hot as tens of millions of degrees, yet sharply separated from even hotter regions. These fronts, stretching over hundreds of thousands of light-years, form as entire clusters of galaxies collide, creating strange, ripple-like patterns in the vast cosmic gas and revealing the hidden weather of the universe on unimaginable scales. ✨
#phenomena⚡#clusters⚡#gas⚡#nasa⚡#galaxy⚡#stars⚡#astronomy⚡#universe⚡#cosmos⚡#space
👉subscribe Universe Mysteries