Мы используем 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
年屆77歲的香港傳媒大亨黎智英,其牢獄歲月於周五(7日)踏入第1500日。他是許多被中國共產黨在香港監禁的政治犯之一,法治已完全消失。
英國人權組織《香港監察》創辦人羅傑斯呼籲全球領導人營救黎智英,並敦促教宗方濟各關注其信仰權利,釋放這位虔誠的天主教徒。
#黎智英#JimmyLai#蘋果日報#新聞自由#人權
At 77, Hong Kong media mogul Jimmy Lai has spent 1,500 days in prison as of Friday (7th). He is one of many political prisoners jailed by the CCP in Hong Kong, where the rule of law has vanished.
Benedict Rogers of Hong Kong Watch calls on global leaders to rescue Lai and urges Pope Francis to advocate for his release, considering his rights as a devout Catholic.
#JimmyLai#AppleDaily#FreePress#HumanRights
Trump’s War on the Press: Lawsuits, Payoffs, and Intimidation
President Trump has escalated his legal campaign against the media, settling some suits, losing others, and keeping a handful of major outlets in his crosshairs. ABC and CBS both coughed up millions—$15 million and $16 million respectively—to avoid protracted battles, with settlements coming suspiciously close to big regulatory approvals for their parent companies. Critics say these payouts are less about justice and more about buying peace with a president who wields the threat of retaliation like a club.
But the fight isn’t over. Trump’s lawsuits against The New York Times, The Wall Street Journal, and the BBC are still grinding through the courts, with claims ranging from defamation to election interference. Legal experts widely agree that most of these cases are weak, but media owners are wary: refusing to settle could mean more lawsuits, regulatory headaches, or even targeted attacks from the administration.
“This is merely an attempt to stifle independent reporting and generate PR attention, but The New York Times will not be deterred by intimidation tactics.”
— NYT spokesperson
Trump’s playbook is clear: sue, threaten, and settle. The message to the press is unmistakable—cross the president, and you might pay dearly, whether in court or at the negotiating table. But as the lawsuits pile up, the question remains: is this about protecting his reputation, or about silencing the watchdogs?
Who’s really afraid of whom?
#Trump#media#lawsuit#freePress#NYT#WSJ#BBC#intimidation
📱American Оbserver - Stay up to date on all important events
🇺🇸