Мы используем 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
#AFP journalist blocked from flying to #Ethiopia's #Tigray region
An AFP journalist was on Thursday barred from boarding a flight to Tigray in northern Ethiopia, where renewed tensions in recent months have raised fears of fresh conflict.
An accredited AFP reporter based in Addis Abeba was blocked from boarding a flight to Shire in Tigray because he did not have authorization from the Ethiopian Ministry of Foreign Affairs.
https://addisstandard.com/?p=55247
Dopo il quotidiano inglese #FinancialTimes oggi ne parla anche l'agenzia francese #AFP: "Le truppe turche per il salvataggio delle persone possono essere impiegate a #Gaza per trovare i corpi degli ostaggi israeliani sotto le macerie".
#Drone strike at #Sudan's border with #Ethiopia kills one: authorities
A drone attack blamed on paramilitary forces killed one person Thursday in the Sudanese town of Kurmuk, on the border with Ethiopia, authorities said.
"One person was killed, eight injured and 16 houses destroyed," a government source told #AFP by phone from #Kurmuk, a border town controlled by the army in Sudan's Blue Nile state.
In a statement, Kurmuk governor Abdelaty Mohamed al-Fiky blamed the strike on the paramilitary Rapid Support Forces (#RSF), at war with the army since April 2023, and their allies, a faction of the Sudan People's Liberation Movement-N orth (SPLM-N). Blue Nile state is the latest front in nearly three years of devastating war, now being fought mainly with deadly drone strikes. The fighting has left tens of thousands dead and around 11 million displaced, creating the world's largest hunger and displacement crises.
https://www.facebook.com/share/18JNprLucH/
News: AI-generated war narratives fuel #Ethiopia–Eritrea tensions online: report
Artificial intelligence (#AI) generated images and videos portraying a hypothetical #Ethiopian military takeover of #Eritrea’s strategic port of #Assab are increasingly shaping online narratives and inflaming tensions between the two countries, according to a report by #AFP.
One of the most prominent creators, 24-year-old Ethiopian law graduate Eliyas Kebede Zemedkun, who has more than 87,000 Facebook followers, told AFP he has spent much of 2026 producing AI-generated content depicting Ethiopia occupying Assab to promote what he described as “Ethiopia’s national narrative.” “I am also motivated to use AI-generated content to challenge narratives that try to downgrade the national army through different demoralizing tactics,” he said, adding that he uses free platforms such as #ChatGPT and #Gemini alongside editing software to create the material.
Read more: https://addisstandard.com/?p=56283