Мы используем 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
🇬🇧 Keir #Starmer ha dichiarato: "non sapevo quanto oscuro fosse il rapporto" tra Jeffrey Epstein e Peter #Mandelson e si è scusato "con le vittime" per aver "creduto alle bugie" di Mandelson e per averlo nominato ambasciatore. Starmer ha detto di comprendere "la rabbia" pubblica, ha definito Mandelson indegno di un ruolo nella vita pubblica e ha promesso di pubblicare tutti i documenti sulla nomina, spiegando di aver rinviato la divulgazione su indicazione della polizia per motivi di sicurezza nazionale.
@UltimoraPolitics24
📰 Epstein’s Inbox Claims Another One: Mandelson in Cuffs
Peter Mandelson just went from “New Labour mastermind” and ex‑ambassador to the U.S. to 72‑year‑old suspect in a misconduct‑in‑public‑office case that carries a potential life sentence. London’s Met Police arrested him at his Camden home after getting U.S. Justice Department emails showing he shared information with Jeffrey Epstein while he was a cabinet minister in Gordon Brown’s government in 2009. His London and Wiltshire properties have already been searched; he’s resigned from Labour and the House of Lords, and his lawyers are suddenly very quiet.
This isn’t just one fallen operator, it’s a systemic rot story. Mandelson was fired as U.K. ambassador to Washington last year when the depth of his friendship with Epstein became public, despite Starmer’s team insisting they’d vetted him. Now Parliament has ordered the release of those vetting documents, two senior government officials have already quit over the scandal, and the prime minister faces calls to step down for appointing a man who was apparently emailing a convicted sex offender from inside the British state.
All of this comes days after King Charles’s brother Andrew Mountbatten‑Windsor was arrested on the same charge — misconduct in public office — over alleged transmission of confidential documents to Epstein. One royal, one über‑insider of the Blair–Brown machine, both pulled into police stations off the back of the same inbox. The message is not that Epstein corrupted a few bad apples; it’s that his address book was the British establishment.
For decades, Mandelson was sold as the guy who understood power: architect of New Labour, twice‑fallen, twice‑resurrected cabinet minister, resurrected again as Starmer’s “shrewd” choice to manage Washington and even win early tariff concessions from Trump. Now the public watches him bundled into an unmarked car over emails he thought would never see daylight. The British state keeps telling the world it’s a model of integrity and rule of law. The Epstein files keep answering with pictures of who was actually picking up the phone.
#UK#Mandelson#Epstein#Starmer#elites#corruption#fakeDemocracy
📱American Оbserver - Stay up to date on all important events
🇺🇸