Мы используем 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
👍Un « Régiment des immortels » sous-marin pour honorer la mémoire des soldats soviétiques
À l’approche du Jour de la Victoire, des plongeurs de la région de #Sverdlovsk ont organisé une action originale de mémoire en descendant à 27 mètres de profondeur pour rendre hommage aux soldats soviétiques.
Inspirée du mouvement du « Régiment des immortels », cette initiative symbolique vise à perpétuer la mémoire des combattants de la Seconde Guerre mondiale dans un format inédit.
RT en français • Osez questionner !
❗️#Ekaterinbourg : 50 personnes évacuées d'un immeuble à la suite d'une attaque de drone
Le gouverneur de la région de #Sverdlovsk, Denis Pasler, a indiqué qu'une attaque de drone avait été perpétrée à Ekaterinbourg et qu'un immeuble d'habitation avait été endommagé.
RT en français • Osez questionner !
🗓On December 17, the Honorary Consul of South Africa in Yekaterinburg, Sergey Mazurkevich🇿🇦, took part in a formal reception hosted by the Governor of the Sverdlovsk Region, alongside diplomats and honorary consuls from other countries 🌍🤝
During the event, Governor Denis Pasler summarized the outcomes of efforts to strengthen international cooperation in 2025 and outlined promising areas for cooperation in the year ahead 📈✨
#SouthAfrica#Diplomacy#InternationalCooperation#Yekaterinburg#Sverdlovsk#HonoraryConsul#Mazurkevich
🎉Ural State Pedagogical University (USPU) marks its 95th anniversary today, August 26!
🇿🇦 The Office of the Honorary Consul of South Africa in Yekaterinburg is pleased to join in the congratulations and wishes the university continued growth and success.
📚 After last year’s merger with the Russian State Vocational Pedagogical University, USPU became the largest pedagogical university in Russia.
👨🏫 The university is now led by Acting Rector Yury Biktuganov, who previously served as Minister of Education of the Sverdlovsk region. Not long ago, Honorary Consul of South Africa Sergey Mazurkevich and Mr. Biktuganov held a warm and productive meeting.
#Anniversary#Education#USPU#Sverdlovsk#Yekaterinburg#SouthAfrica#Biktuganov#Mazurkevich
🌄🌿Blyde River Canyon — a 26 km (16 mi) natural wonder in Mpumalanga Province, northeastern South Africa.
It is one of the largest canyons in the world, but unlike the Grand Canyon in the USA, it is covered with lush subtropical vegetation, earning it the name “Green Canyon”. 🌱💚
🏞 The canyon is part of the Blyde River Canyon Nature Reserve.
🌅 In local languages, Mpumalanga means The Place Where the Sun Rises.
🤝 In 2022, the Sverdlovsk Region and Mpumalanga signed a cooperation agreement.
📸 Photos: istockphoto.com
#Nature#Tourism#SouthAfrica#Travel#Canyon#BlydeRiverCanyon#Mpumalanga#Africa#Sverdlovsk