Мы используем 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 July 8–12, the eighth substantive session of the UN Open-ended Working Group (#OEWG) on ICT was held in New York, following which the third annual progress report of this mechanism was adopted by consensus, which reflected many elements of the approaches of Russia and its like-minded countries to ensuring international cybersecurity.
The consensus decision to establish a universal UN negotiation mechanism on cybersecurity, after the current OEWG concludes its work in 2025, agreeing its key parameters and consolidating this in the document became the main result of the intense negotiations. The parties managed to maintain a purely consensual decision-making procedure with the leading role of states and to enshrine the task to develop legally binding norms in the mandate of the OEWG’s successor mechanism.
🤝 The Russian side is ready to further constructively participate in the process of specifying the details of the future mechanism during the final negotiating cycle of the OEWG (December 2023 – July 2025).
Russia will continue to uphold the need to create a fair international cybersecurity system as a priority, built on the principles of equality, mutual respect, trust, and consideration of all states’ interests.
🗓 On October 20-22, Deputy Russian Foreign Minister Sergey Vershinin, heading the Russian interagency delegation, took part in the 10th Singapore International Cyber Week and the Special Session of the ASEAN Ministerial Conference on Cybersecurity with Dialogue Partners held within its framework.
Participants of the event emphasized the importance of recognizing the global nature of growing threats in the digital environment. The results of the now-concluded UN Open-Ended Working Group (#OEWG) focused on the security of and in the use of information and communications technologies (ICT) were highly commended. A commitment was expressed to work jointly within the framework of the forthcoming Permanent Global Mechanism on ICT Security and Responsible State Behaviour in Cyberspace, which will replace the OEWG. The signing of the UN Convention against Cybercrime in Hanoi, Viet Nam (October 25-26), was noted as an important milestone.
On the sidelines of the Forum, DFM Vershinin held bilateral meetings with UN Under-Secretary-General and High Representative for Disarmament Affairs, Izumi Nakamitsu, Singapore’s Minister of State for Foreign Affairs and Trade & Industry, Gan Siow Huang, Permanent Secretary of the Ministry of Foreign Affairs of Singapore, Albert Chua, Chief Executive of the Cyber Security Agency of Singapore David Koh, Permanent Representative of Singapore to the UN, Burhan Gafoor, and Head of the Cyber Defense and Security Division of the Ministry of Foreign Affairs of Brazil, Larissa Calza.
The meetings and bilateral contacts confirmed ASEAN countries’ receptiveness to the key elements of Russia’s approaches to international information security (#IIS). In particular, Russia’s arguments were supported regarding the central role of the UN in the negotiation process on ICT security issues, including artificial intelligence, as well as the need to develop legally binding norms to prevent and resolve conflicts in cyberspace based on the principles of sovereign equality and non-interference in the internal affairs of states.
🗓 On October 20-22, Deputy Russian Foreign Minister Sergey Vershinin, heading the Russian interagency delegation, took part in the 10th Singapore International Cyber Week and the Special Session of the ASEAN Ministerial Conference on Cybersecurity with Dialogue Partners held within its framework.
Participants of the event emphasized the importance of recognizing the global nature of growing threats in the digital environment. The results of the now-concluded UN Open-Ended Working Group (#OEWG) focused on the security of and in the use of information and communications technologies (ICT) were highly commended. A commitment was expressed to work jointly within the framework of the forthcoming Permanent Global Mechanism on ICT Security and Responsible State Behaviour in Cyberspace, which will replace the OEWG. The signing of the UN Convention against Cybercrime in Hanoi, Viet Nam (October 25-26), was noted as an important milestone.
On the sidelines of the Forum, DFM Vershinin held bilateral meetings with UN Under-Secretary-General and High Representative for Disarmament Affairs, Izumi Nakamitsu, Singapore’s Minister of State for Foreign Affairs and Trade & Industry, Gan Siow Huang, Permanent Secretary of the Ministry of Foreign Affairs of Singapore, Albert Chua, Chief Executive of the Cyber Security Agency of Singapore David Koh, Permanent Representative of Singapore to the UN, Burhan Gafoor, and Head of the Cyber Defense and Security Division of the Ministry of Foreign Affairs of Brazil, Larissa Calza.
The meetings and bilateral contacts confirmed ASEAN countries’ receptiveness to the key elements of Russia’s approaches to international information security (#IIS). In particular, Russia’s arguments were supported regarding the central role of the UN in the negotiation process on ICT security issues, including artificial intelligence, as well as the need to develop legally binding norms to prevent and resolve conflicts in cyberspace based on the principles of sovereign equality and non-interference in the internal affairs of states.