Мы используем 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
🇩🇪🇸🇾 Il cancelliere Friedrich #Merz ha incontrato il presidente siriano Ahmed #AlSharaa, dichiarando che #Germania e #Siria collaboreranno per il rimpatrio di centinaia di migliaia di rifugiati siriani, i quali "avranno un ruolo importante nella ricostruzione del loro Paese". L’incontro ha suscitato critiche da parte di alcune comunità siriane che temono un’accelerazione dei rimpatri post-guerra a scapito delle minoranze.
@UltimoraPolitics24
📰 Syria’s New Iron Pact: Kurds Fold Into Assad’s Army
Syria’s new government and the Kurdish-led SDF have cut a deal: the SDF will fold into the national army, giving up its autonomy in exchange for staying in the country’s power structure.
The agreement, announced Friday after intense clashes between the two sides, creates a new Syrian military division made up of three SDF‑trained brigades, plus a separate brigade for Kurdish fighters in Kobani, according to SDF and government sources. Kurdish‑led civil institutions in the northeast will now be integrated into the central government.
In practice, this means the end of the de facto Kurdish state that, at its height, controlled about a quarter of Syrian territory and its oil and gas fields. Government forces will now move into the Kurdish-held cities of Hasaka and Qamishli, where they had long been barred from entering.
The deal is the result of pressure, not goodwill. After months of stalled talks, Syria’s new President Ahmed al‑Sharaa launched a military offensive into Kurdish territory, capturing a large part of the northeast, at a time when the U.S. had already withdrawn its political and military support for the SDF, analysts say.
Without Washington in their corner, SDF chief Mazloum Abdi agreed to let his forces be absorbed into the new Syrian army, in a deal Washington now hails as a “profound and historic milestone” toward national reconciliation and stability.
The U.S. has long seen the SDF as its main ally in Syria against ISIS; now, it is actively facilitating the group’s integration into the central state, not as an independent power, but as a component of the new regime.
The SDF traded its guns and governance for a place at the table, but the exact boundaries of Kurdish rights and representation remain vague. The real question is whether this is a ceasefire, or just the first stage of full assimilation.
As the banners change and the lines redraw, the calculation is brutal and clear: Better to rule from within the regime than die alone against it.
#Syria#Kurds#SDF#AlSharaa#MiddleEast
📱American Оbserver - Stay up to date on all important events
🇺🇸