Мы используем 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
🌎 At the Musonoi mine in the Democratic Republic of the Congo, the mineral cuprosklodowskite forms vivid green crystals rich in uranium. This rare mineral is highly radioactive and prized by collectors, but handling it requires special care because of its radioactivity. ✨
#minerals⚡#crystals⚡#geology
👉subscribe Interesting Planet
👉more Channels
🌎 At Canada’s Mount Saint-Hilaire, the mineral serandite forms pinkish-orange crystals that are so rare, top-quality specimens are found only at this site. Serandite is a sodium, calcium, and manganese silicate, prized by collectors for its vibrant color and crystal shapes. ✨
#minerals⚡#geology⚡#crystals
👉subscribe Interesting Planet
👉more Channels
🌎 The world's rarest mineral is kyawthuite, a reddish-orange crystal discovered in Myanmar. Only one confirmed specimen exists, weighing just 1.61 carats, and it is made of bismuth, antimony, and oxygen. ✨
#minerals⚡#geology⚡#crystals
👉subscribe Interesting Planet
👉more Channels
🌎 Tanzanite is a vivid blue-violet mineral found only in a small area near Mount Kilimanjaro, Tanzania. This rare crystal is a variety of zoisite colored by trace amounts of vanadium. The entire world’s supply comes from a mining zone just 7 kilometers long. ✨
#minerals⚡#crystals⚡#geology
👉subscribe Interesting Planet
👉more Channels
🌎 In the Himalayas, rare crystal minerals like cavansite and scolecite form in volcanic rock cavities. Cavansite appears as brilliant blue clusters, while scolecite grows in needle-like sprays. Some Himalayan cavansite crystals are less than a few millimeters wide. ✨
#minerals⚡#crystals⚡#geology
👉subscribe Interesting Planet
👉more Channels
🌎 Bhutanite is an exceptionally rare mineral discovered in the Himalayan mountains of Bhutan. It forms metallic blue-gray crystals and contains copper, bismuth, and sulfur. Fewer than a dozen confirmed specimens exist worldwide, making it highly prized among mineral collectors. ✨
#minerals⚡#geology⚡#crystals
👉subscribe Interesting Planet
👉more Channels
🌎 In 2009, the mineral putnisite was discovered in Western Australia. This vibrant purple mineral forms tiny cubic crystals and contains strontium, calcium, chromium, sulfur, oxygen, hydrogen, and carbon. Unlike any known mineral group, putnisite’s unique chemical structure has fascinated mineralogists worldwide. ✨
#minerals⚡#geology⚡#crystals
👉subscribe Interesting Planet
👉more Channels
🌎 Hidden deep in Greenland’s Ilímaussaq complex, the mineral arfvedsonite forms striking blue-black crystals. This rare silicate mineral is found mainly in alkaline igneous rocks and is prized by mineral collectors. Some arfvedsonite crystals can reach lengths over 30 centimeters. ✨
#minerals⚡#crystals⚡#geology
👉subscribe Interesting Planet
👉more Channels
🌎 Some of Earth’s rarest minerals include fingerite, found only near one volcano in El Salvador, and red beryl, which forms under extreme volcanic conditions in Utah. Fewer than one red beryl crystal is found for every 150,000 diamonds. ✨
#minerals⚡#crystals⚡#geology
👉subscribe Interesting Planet
👉more Channels
🌎 In Greenland, the mineral tugtupite glows bright pink or red under ultraviolet light due to its unique crystal structure. This rare silicate forms in only a few places worldwide and is prized for use in jewelry. Tugtupite was first identified in 1962, and gem-quality stones are especially sought after by collectors. ✨
#geology⚡#minerals⚡#crystals
👉subscribe Interesting Planet
👉more Channels
🌎 In Pakistan’s Balochistan province, the mineral rehmeyerite is so rare that only a handful of crystals have ever been found. Rehmeyerite forms as thin, metallic blades containing selenium, and its largest specimens rarely exceed a few millimeters in length. ✨
#minerals⚡#geology⚡#crystals
👉subscribe Interesting Planet
👉more Channels
🌎 The mineral cobaltite is prized by collectors for its metallic silver-gray cubes with a pinkish hue. Found mainly in Sweden, Norway, and Canada, cobaltite is a rare source of the metal cobalt, essential for rechargeable batteries and jet engine alloys. Its crystals rarely exceed 2 centimeters in size. ✨
#minerals⚡#geology⚡#crystals
👉subscribe Interesting Planet