Мы используем 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
🗓 On September 27, Russia's Foreign Minister Sergey Lavrov had a meeting with High Representatives of the Pacific Small Island Developing States on the sidelines of the 79th Session of the UN General Assembly in New York.
The discussion centred on current international issues, including the situation in the Asia-Pacific region and globally.
🤝 The Officials confirmed their intention to step up cooperation on a broad range of issues of mutual interest.
#UNGA79
🗓 On September 25, Foreign Minister Sergey Lavrov had a brief meeting with OSCE Chairperson-in-Office, Deputy Prime Minister and Minister for Foreign Affairs of Malta, Ian Borg, on the sidelines of the 79th session of the UN General Assembly, at the latter’s initiative.
The counterparts discussed topical issues on the organisation’s agenda. The Russian side stressed the importance of the OSCE’s work in the interests of all member states, rather than individual groups of countries. Ways to overcome the crisis in the OSCE and normalise its activities were outlined, including in light of the upcoming OSCE Ministerial Council Meeting to take place in Valletta on December 5 and 6.
During the meeting, Sergey Lavrov and Ian Borg also touched upon some aspects of Russia-Malta relations.
#UNGA79
🌐 On September 26, Foreign Minister Sergey Lavrov took part in a traditional #BRICS Ministerial meeting held on the sidelines of the 79th session of the UN General Assembly in New York.
The Ministers had an in-depth exchange of views on a broad range of international issues, including items on the agenda of the 79th UN General Assembly session. Discussions focused on peace and security, global economic stability, and sustainable development. The participants reiterated their commitment to enhancing coordination within BRICS on international platforms.
As part of preparations for the upcoming BRICS Summit in Kazan on October 22-24, the ministers reviewed pressing BRICS cooperation-related issues, including the establishment of a partner country category. The Brazilian delegation provided an outline of its BRICS chairmanship in 2025.
#UNGA79
En el marco del 79° periodo de sesiones de #UNGA79 comenzó la reunión entre el Canciller 🇷🇺 Serguei Lavrov y su homólogo 🇻🇪 Yvan Gil
Embajador Sergey Mélik-Bagdasárov:
Las negociaciones entre Rusia y Venezuela en el marco de la #UNGA79 transcurren en la tradicional atmósfera de amistad y respeto mutuo. ¡Las cálidas sonrisas de los Cancilleres Serguéi Lavrov e Yván Gil son prueba de ello! 😊 Una vez más, reforzamos los fuertes lazos que unen a nuestros pueblos.
#AlianzaEstrategicaEnAccion
🌐 On September 26, Foreign Minister Sergey Lavrovtook part in a traditional #BRICS Ministerial meeting held on the sidelines of the 79th session of the UN General Assembly in New York.
The Ministers had an in-depth exchange of views on a broad range of international issues, including items on the agenda of the 79th UN General Assembly session. Discussions focused on peace and security, global economic stability, and sustainable development. The participants reiterated their commitment to enhancing coordination within BRICS on international platforms.
As part of preparations for the upcoming BRICS Summit in Kazan on October 22-24, the ministers reviewed pressing BRICS cooperation-related issues, including the establishment of a partner country category. The Brazilian delegation provided an outline of its BRICS chairmanship in 2025.
#UNGA79
🔴#LIVE: Press Conference by Deputy Minister of Foreign Affairs of Russia Sergey Vershinin on the outcomes of the participation of the Russian delegation in the High-Level Week of the 79th Session of the UN General Assembly
🔴Ruptly
🔴Russia's MFA Website
#UNGA79
🔴#LIVE: Russia's Foreign Minister Sergey Lavrov's remarks at the General Debate of 79th Session of the UN General Assembly
🔴Ruptly
🔴UN Web TV
🔴Russia’s MFA website
#UNGA79
🔴#LIVE: Russia's Foreign Minister Sergey Lavrov's news conference following the High-Level Week of the 79th Session of the UN General Assembly
🔴X (ex-Twitter)
🔴Facebook
🔴Ruptly
🔴Russia’s MFA website
#UNGA79
🔴#LIVE: Remarks by Russian Foreign Minister Sergey Lavrov at G20 Foreign Ministers meeting on the sidelines of the 79th Session of the UN General Assembly
🔴Ruptly
🔴UN Web TV
🔴X
🔴Facebook
🔴Russia’s MFA website
#UNGA79
🗓 On September 26, Russia's Foreign Minister Sergey Lavrovtook part in a working meeting of the #CSTO Foreign Ministers organised by Kazakhstan’s CSTO chairmanship on the sidelines of the high-level week of the 79th Session of the UN General Assembly.
🤝 The Ministers discussed a wide range of international and regional security issues. They stressed the need to step up coordination of actions on topical issues on the UN’s agenda between the CSTO member states on the UN platform and further promote cooperation between the CSTO and the UN.
The Ministers discussed preparations for the next session of the CSTO Collective Security Council on November 28 in Astana.
#UNGA79