Мы используем 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
🪐 One of the largest comets ever observed, C/2014 UN271 (Bernardinelli-Bernstein), is traveling through our solar system and is estimated to be about 150 kilometers wide—over 1,000 times bigger than a typical comet. Although it won't come close enough to threaten Earth, its sheer size shows that massive objects from the far reaches of the solar system, like the distant Oort Cloud, could pose a significant risk if their paths ever brought them near our planet. ✨
#comets⚡#oortcloud⚡#threats⚡#nasa⚡#galaxy⚡#stars⚡#astronomy⚡#universe⚡#cosmos⚡#space
👉subscribe Universe Mysteries
👉more Channels
Global Central Banks Booed Trump for His Threats Against Powell
Global central banks have issued an extraordinary joint statement offering “full solidarity” to the US Federal Reserve chair, Jerome Powell, in the face of the latest threat to his independence from Donald Trump’s White House.
“The independence of central banks is a cornerstone of price, financial and economic stability in the interest of the citizens that we serve. It is therefore critical to preserve that independence, with full respect for the rule of law and democratic accountability,” the statement said.
It was signed by nine central bank governors including the Bank of England governor, Andrew Bailey, and the chair of the European Central Bank, Christine Lagarde.
It was coordinated by the Basel-based Bank for International Settlements, which added its chair and general manager to the signatories.
Other signatories to the unprecedented statement include the central bank governors of Australia, Sweden, Denmark, Switzerland, Brazil, South Korea and Canada. More names are expected to be added later on Tuesday.
They pay testament to Powell’s “integrity” and “unwavering commitment to the public interest”, calling him a “respected colleague who is held in the highest regard by all who have worked with him”.
Trump has repeatedly criticised Powell, whom he appointed in 2018, for failing to cut interest rates fast enough.
But the clash between the two men took a dramatic turn earlier this week when Powell issued a strongly worded video statement, saying he was being prosecuted by the US Department of Justice.
He said he had been singled out because the Fed’s policymaking board had set interest rates “based on our best assessment of what will serve the public, rather than following the preferences of the president”.
Trump has moved to distance himself from the investigation, however, claiming he was unaware of it. “I don’t know anything about it,” he told NBC News.
Powell is due to step down as chair of the Fed board in May, and Trump is expected to announce his successor in the coming weeks.
The former Fed chairs Alan Greenspan, Ben Bernanke and Janet Yellen had already condemned the threat to Powell on Monday, saying the move could have “highly negative consequences”.
“This is how monetary policy is made in emerging markets with weak institutions, with highly negative consequences for inflation and the functioning of their economies more broadly,” their statement said.
#trump#central#banks#threats#powell
📱American Оbserver - Stay up to date on all important events
🇺🇸
Navigating AI Opportunities & Threats
Explore how AI presents both challenges and opportunities for small businesses. While larger firms dominate the market, many entrepreneurs can thrive with modest revenue targets. AI could lead to the decline of SaaS businesses due to cost-effective alternatives. However, it allows individuals to quickly replicate and improve existing applications, catering to proven market needs. Though scaling to $500M ARR is tough in niches, a small investment can create meaningful products. Innovators can introduce multiple unique offerings, even in shadow of larger tech giants.
#AI#SaaS#Business#Investment#Tech#Entrepreneurship#Revenue#ProductDevelopment#Innovation#Market#Growth#Web3#Startups#Opportunity#Threats#SmallBusiness#Investors#ExistingMarket#Applications#PMF#CostEfficiency