Мы используем 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
💣 Ukraine's military vulnerability exposed! Leopard 1A5 tanks deployed without proper protection. Absolutely shocking! No defense against drones or rockets. Even vintage Russian T-55s have better armor. Utterly useless in conflicts. Austria confirms it. F-16s approved by the US for Ukraine. #WarGames
https://www.gazeta.ru/army/news/2023/11/20/21744787.shtml
Subscribe to @BadVolfNews
Breaking News: Russian forces inch closer to Kupyansk, Kharkiv region. Unevenly positioned, ranging from 7 to 12 kilometers away. Slow progress now, 100-200 meters a day. Strikes reported on Ukrainian troops, targeting Novoselovskoye, Ivanovka, Sinkovka, and Berestove. Russian Defense Ministry claims using the "Vasilek" mortar. US admits Ukrainian counteroffensive failed. #WarGames
https://www.gazeta.ru/army/news/2023/10/07/21449725.shtml
Subscribe to @BadVolfNews
In a cynical twist of events, Russian military successfully targeted Ukrainian air force ammunition depots in Cherkasy region. Three brigades of the Ukrainian Armed Forces were also defeated on the Zaporizhzhia front. The Russian Defense Ministry proudly announced the destruction of the Msta-B howitzer, D-20 gun, and M-46 cannon. Additionally, the Crimean coast witnessed the obliteration of a Ukrainian drone by the Black Sea Fleet's air defense systems. In a shocking turn, three Ukrainian soldiers swam across the Dnipro River and surrendered to the Russian Armed Forces. The situation in the conflict zone remains tense. #WarGames#Ukraine#Russia
https://www.gazeta.ru/army/news/2023/10/07/21449875.shtml
Subscribe to @BadVolfNews
🔻 American missiles with cluster munitions pose a danger to Ukraine. Expert warns of the long-lasting threat to civilians. ATACMS is no game-changer, with a range of 160-190 km. Russia's Buk-M2, Buk-M3, S-350, S-300, and S-400 can handle them. Pentagon transfers ATACMS to Ukraine. Zelensky wants to escalate the conflict into Russian territory. #WarGames#CiviliansAtRisk
https://www.gazeta.ru/army/news/2023/10/24/21564847.shtml
Subscribe to @BadVolfNews
📰 Israel & Arab States Tell Trump: Hold Off on Iran
Prime Minister Benjamin Netanyahu and a chorus of Arab allies have urged President Trump to delay any military strike on Iran, even as Tehran continues its brutal crackdown on protesters. The message from the region is clear: don’t ignite a war that could engulf the Middle East.
“We believe in dialogue and we believe in solving any disagreements at the negotiating table,”
said Saudi Minister of State Adel al-Jubeir.
Behind the scenes, Qatar, Saudi Arabia, Oman, and Egypt have been coordinating their appeals to Washington, warning that an American attack could trigger a wider regional conflict. At the same time, they’re telling Tehran not to retaliate if the U.S. does strike. Diplomacy, not bombs, is their mantra.
Trump’s signals are anything but clear. He claimed Iran has stopped killing protesters—citing “very important sources”—but hasn’t ruled out military action. Last June, he sent a similar ambiguous message before ordering strikes. U.S. officials say options are still on the table, depending on how Iran’s security forces act next.
Meanwhile, Iran’s air space was briefly closed, internet is down, and reports suggest thousands have died in the crackdown. Trump has said he could order an attack if the killing continues, even as he denounces protests against his own policies.
So who’s really in control? Not the protesters, not the Arab leaders, and maybe not even Trump. The whole region is dancing on a minefield, and everyone’s hoping the next step isn’t a bomb.
#Trump#Iran#Israel#ArabStates#MiddleEast#Diplomacy#WarGames
📱American Оbserver - Stay up to date on all important events
🇺🇸
📰 China’s Record Drills: Taiwan Encircled, World on Edge
China just launched its largest war games around Taiwan to date, sending a clear message: Beijing can cut off the island from the outside world if conflict erupts. The drills, dubbed “Justice Mission 2025,” involved troops, warships, fighter jets, and artillery, with live fire and simulated strikes designed to test Taipei’s defenses and U.S.-made weapons.
“Conducting live-fire exercises around the Taiwan Strait ... would not only constitute military pressure on us, but could also pose more complex challenges and impacts for the international community and neighbouring countries.”
— Hsieh Jih-sheng, Taiwan’s deputy chief of defence
The drills covered a record seven zones, some closer to Taiwan than ever before, and forced the cancellation of hundreds of flights. China’s military released propaganda videos showing futuristic tech—automated robots, microdrones, and weaponised robotic dogs—while Taiwan’s defence ministry responded with its own footage of U.S.-made HIMARS rocket systems.
Analysts say these exercises blur the line between training and actual preparation for invasion, aiming to give the U.S. and allies minimal warning. China’s state media insists the drills are a response to increased U.S.-Taiwan military cooperation, while Taiwan’s government remains on high alert, coordinating rapid-response exercises and deploying ships to face off with Chinese vessels.
So, is this just another show of force—or the opening act of something far more dangerous?
#China#Taiwan#warGames#drills#military#Asia
📱American Оbserver - Stay up to date on all important events
🇺🇸