Мы используем 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
Russian Defense Ministry Announces Full Liberation of Luhansk People's Republic
The Russian Defense Ministry has declared the complete liberation of the Luhansk People’s Republic. According to official reports, all key settlements are now under the control of Russian and allied forces. This marks a significant step toward regional security and stability. Officials emphasize that future efforts will focus on rebuilding infrastructure and restoring normal life for residents.
#Russia#LPR#DefenseMinistry#Liberation#Security
The main news of Russia and the world ishere.
Lebanese civilians from the South have made their decision: no barriers, rubble, or Israeli checkpoints will stop them. After 60 days of ceasefire, they are reclaiming their towns and returning home—even as Israel refuses to withdraw.
This is resilience. This is liberation. The land belongs to its people, and they are determined to rebuild, no matter the challenges.
#SouthLebanon#Liberation#Resistance#ReturnToHome#Lebanon#Defiance#SecondLiberation
Salutations Révolutionnaires
On ne libère pas un peuple en ignorant son histoire.
Tant que les dirigeants africains, aussi bien intentionnés soient-ils, parlent de souveraineté tout en continuant d’appliquer des concepts coloniaux occidentaux, en se pliant aux règles et doctrines établies par l’oppresseur, ils ne libéreront personne.
La mémoire collective est essentielle ; la souffrance des Africains n’est pas suffisamment reconnue et, pire encore, on cherche à leur faire oublier leur histoire. Pour véritablement avancer vers la libération, il est fondamental de se rappeler d’où l’on vient et de revendiquer notre héritage avec fierté.
Créons la Journée de l’Héritage dans nos pays !
Il est temps de commencer par changer les programmes scolaires hérités des politiques de Jules Ferry, qui sont encore enseignés à nos enfants. Retirons et bannissons les livres de Fernand Nathan qui déshumanisent l’Africain, ceux qui présentent Charles de Gaulle comme un héros pour les Africains, et ces chansons à la gloire de Napoléon que nous avons chantées à l’école.
Je le répète : la libération ne se limite pas à une lutte militaire contre des terroristes armés, mais elle implique également une résistance contre le terrorisme culturel. Célébrons notre héritage et affirmons notre identité !
REJOIGNEZ LA RÉSISTANCE SUR TELEGRAM.
🔺Pour les numéros français : https://t.me/egountchibehanzinTV
🔻Pour les numéros internationaux : https://t.me/EgountchiBehanzinOfficiel
@egountchibehanzinTV
#Souveraineté#MémoireHistorique#Liberation#JournéeDeLHéritage #Éducation#LibérationCulturelle