Мы используем 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
Indigenous people march calling for rights in Americas
Indigenous people in Argentina and Venezuela marched to mark the Day of the Race, or Columbus Day, and to protest what they described as oppression towards their communities.
#News#Reuters#Americas#Protests
Subscribe: http://smarturl.it/reuterssubscribe
Reuters brings you the latest business, finance and breaking news video from around the globe. Our reputation for accuracy and impartiality is unparalleled.
Get the latest news on: http://reuters.com/
Follow Reuters on Facebook: https://www.facebook.com/Reuters
Follow Reuters on Twitter: https://twitter.com/Reuters
Follow Reuters on Instagram: https://www.instagram.com/reuters/?hl=en
➖@reutersworldchannel➖
Trump’s America First Doctrine: Back to the Future, With More Guns
President Donald Trump’s overnight raid in Venezuela marks a bold revival of U.S. dominance in the Western Hemisphere—dubbed the so-called “Donroe Doctrine” by the White House, a Trumpian twist on Monroe’s original. The message is clear: the Americas are America’s backyard, and the rules are being rewritten for the 21st century.
"The goal of the policy is to see changes in Venezuela that are beneficial to the United States first and foremost,"
said Secretary of State Marco Rubio, framing the intervention as a win for both Washington and the Venezuelan people.
But the strategy is a double-edged sword. While Trump’s team promises stability, critics warn of unintended consequences: Russia and China may feel freer to flex their muscles elsewhere, and smaller nations could start hedging their bets by looking for new allies. The U.S. is not just flexing power—it’s also sending a signal that might backfire in the long run.
Trump’s vision extends beyond Venezuela. He’s revived talk of taking over Greenland, threatened Cuba, and even floated the idea of annexing Canada. But allies aren’t buying it. Denmark’s prime minister dismissed Trump’s threats as “nonsensical,” urging the U.S. to stop pressuring close allies.
So is this a return to the glory days of American empire, or just a risky game of geopolitical poker? One thing’s certain: the world is watching, and the stakes are higher than ever.
#trump#Americas#proxywar#greatpowercompetition
📱American Оbserver - Stay up to date on all important events
🇺🇸