Мы используем 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
🌍 The polar climate zones, found near the North and South Poles, have average summer temperatures below 10°C. Here, permanent ice and tundra dominate, with only hardy mosses and lichens surviving. ✨
#climate⚡#polar⚡#tundra⚡#geography⚡#nature⚡#earth
👉subscribe Amazing Geography🌍
🪐 The galaxy NGC 2685, also called the Helix Galaxy, is a striking example of a "polar ring galaxy," where a large ring of stars and gas orbits nearly perpendicular to the main disk. This rare and twisted structure probably formed when NGC 2685 captured material from another galaxy, creating a cosmic spectacle that challenges our ideas of how galaxies grow and evolve. ✨
#galaxies⚡#shapes⚡#polar⚡#nasa⚡#galaxy⚡#stars⚡#astronomy⚡#universe⚡#cosmos⚡#space
👉subscribe Universe Mysteries
🌍 Antarctica is home to “blue ice” areas where strong winds strip away snow and expose centuries-old glacier ice, creating shimmering fields that reflect nearly as much sunlight as fresh snow. ✨
#glaciers⚡#Antarctica⚡#polar⚡#geography⚡#nature⚡#earth
👉subscribe Amazing Geography
👉more Channels
🌍 In Antarctica’s Dry Valleys, glaciers flow slowly over bare rock and create icy waterfalls called “ice falls,” frozen in mid-cascade for years in the planet’s coldest, driest desert region. ✨
#glaciers⚡#Antarctica⚡#polar⚡#geography⚡#nature⚡#earth
👉subscribe Amazing Geography
👉more Channels
🌍 In Antarctica’s McMurdo Dry Valleys, some glaciers create striking red waterfalls called “Blood Falls.” The color comes from iron-rich water oxidizing as it flows out of the ice. ✨
#glaciers⚡#polar⚡#Antarctica⚡#geography⚡#nature⚡#earth
👉subscribe Amazing Geography🌍
🌍 Some Antarctic glaciers can move several meters in a single day, driven by gravity and melting underneath. These "ice rivers" shape the landscape faster than most people imagine. ✨
#glaciers⚡#polar⚡#Antarctica⚡#geography⚡#nature⚡#earth
👉subscribe Amazing Geography🌍
🌍 In polar regions, "diamond dust" can fall from clear skies. This glittering ice fog is made of tiny ice crystals that drift in the air, sparkling in sunlight even when there’s no snowstorm. ✨
#glaciers⚡#polar⚡#arctic⚡#geography⚡#nature⚡#earth
👉subscribe Amazing Geography
👉more Channels
🌍 In polar regions, some glaciers move so fast they form towering "ice cliffs" over 100 meters high at their edges. These dramatic walls can collapse suddenly into the sea during major calving events. ✨
#glaciers⚡#polar⚡#ice⚡#geography⚡#nature⚡#earth
👉subscribe Amazing Geography
👉more Channels
🌍 Some polar glaciers are so thick that their bottoms lie below sea level for hundreds of meters. These vast "marine ice sheets" hold enough frozen water to alter global coastlines if they melt. ✨
#glaciers⚡#polar⚡#ice⚡#geography⚡#nature⚡#earth
👉subscribe Amazing Geography🌍
🌍 Some glaciers can glow blue beneath the surface. This vivid color appears when dense, compressed ice absorbs red light and scatters only the blue, creating striking icy caverns in polar regions. ✨
#glaciers⚡#polar⚡#ice⚡#geography⚡#nature⚡#earth
👉subscribe Amazing Geography🌍
🌍 Some polar lakes never see sunlight and stay covered with ice year-round. Microbes living under this ice survive in complete darkness, making them some of the most isolated life forms on Earth. ✨
#glaciers⚡#polar⚡#microbiology⚡#geography⚡#nature⚡#earth
👉subscribe Amazing Geography
👉more Channels