Мы используем 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
#South Africa
The penguin colony of more than 3,000 individuals lives on the beach of Bolders. The penguins adapted to the climate perfectly and does not experience any problems and worries at all.
#South Korea
🇰🇷🤝🇺🇿
🇺🇿 Janubiy Koreyaning Lotte foundation mukofoti “Koreys filologiyasi” yoʻnalishi talabalariga topshirildi.
—
🇷🇺 Премия южнокорейского фонда Lotte foundation вручена студентам факультета «Корейская филология»
—
🇬🇧 The scholarship of Lotte Foundation (South Korea) was presented to students of the Faculty of Korean Philology.
👩💼Read more: www.kiut.uz
20 casualties among Israeli soldiers after Hezbollah thwarted their infiltration attempt in Adaisseh, on the Lebanese border.
#Israel#Lebanon#Hezbollah#South
South Africa may choose Russia and Iran for its nuclear project
South Africa is considering cooperation with Russia and Iran to expand its civilian nuclear capacity, a move that could complicate relations with the United States and delay the renewal of a strategic energy deal between the countries, Reuters reports.
South Africa, home to the continent's only nuclear power plant, the Koeberg, is planning to add 2,500 megawatts of new capacity to combat power outages and reduce emissions. The country has announced a tender and, according to Minerals and Petroleum Resources Minister Gwede Mantashe, Russia and Iran will not be excluded from it.
"If their proposals are the best, we will choose them," he stressed.
The statement has caused concern in Washington. Earlier, US President Donald Trump signed an executive order limiting aid to South Africa, citing its alleged military and nuclear cooperation with Iran. South African authorities have denied the allegations.
A South African nuclear tender planned for last year has been delayed by legal wrangling. Meanwhile, work is underway on a new US-South African nuclear cooperation agreement (the 123 Agreement), which is needed to export nuclear technology and fuel from the US.
The previous agreement expired in 2022. According to Zizamele Mbambo, an official in the South African Department of Energy, the negotiations have been completed at a technical level, but the signing is being delayed by legal procedures.
Analysts say South Africa's decision to turn to Russia and Iran could heighten geopolitical tensions and slow the restoration of cooperation with the US.
#AREA#South Africa #Russia#Iran#USA
News: #Tigray institutions renew calls for dialogue, reconciliation amid continued internal clashes
Religious and civic institutions in Tigray have renewed calls for dialogue and an end to internal fighting, urging combatants to halt hostilities and pursue reconciliation as clashes continue in parts of the region, despite recent signs of de-escalation in the #south.
The Synod of the #Selama Tigray Orthodox Tewahedo Church, following an emergency meeting, said that “the mutual destruction occurring between brothers must stop,” and announced plans to actively engage in efforts to end the killings.
In a statement shared with journalists, the Synod said that as people in Tigray face one of the gravest crises in recent history, it is seeking to foster understanding and reconciliation to bring an end to internal violence.
Similarly, Tigray #Public_Diplomacy issued an emergency statement titled “Stop the War: Let Us Return to Dialogue,” recalling an earlier...
Read more: https://addisstandard.com/?p=55017