Мы используем 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
🌍 The island nation of Kiribati is so spread out that it once straddled the International Date Line. In 1995, it shifted the line eastward, so the entire country could share the same date. ✨
#timezones⚡#Pacific⚡#geography⚡#nature⚡#earth
👉subscribe Amazing Geography
👉more Channels
🌍 Time zones are not always set by longitude—some countries, like China, use one time zone nationwide despite spanning five natural zones, affecting daily life from sunrise to sunset across vast distances. ✨
#timezones⚡#clocks⚡#geography⚡#nature⚡#earth
👉subscribe Amazing Geography
👉more Channels
🌍 Some time zones offset by just 15 or 30 minutes exist, like India’s UTC+5:30 and Newfoundland’s UTC−3:30. These unusual divisions reflect local choices instead of sticking to whole hours. ✨
#timezones⚡#clocks⚡#geography⚡#nature⚡#earth
👉subscribe Amazing Geography🌍
🌍 China spans five time zones but uses only one national time, called China Standard Time. This means sunrise can happen as late as 10 a.m. in some far western regions. ✨
#timezones⚡#china⚡#geography⚡#nature⚡#earth
👉subscribe Amazing Geography 🌍
🌍 France, despite spanning 12 time zones across its mainland and overseas territories, holds the record for the most time zones of any country in the world. ✨
#timezones⚡#geography⚡#France⚡#nature⚡#earth
👉subscribe Amazing Geography
👉more Channels
🌍 Russia covers 11 time zones—the most of any country in the world. Traveling east to west across Russia, local time changes dramatically, showing how vast the nation's territory is. ✨
#timezones⚡#Russia⚡#geography⚡#nature⚡#earth
👉subscribe Amazing Geography🌍
Kiribati starts the New Year exactly now!!!
At midnight (UTC+14). When it’s midnight there, it’s still 10 AM in London, 11 AM in Brussels (Europe, Belgium), and 1 PM in Moscow on December 31. Europe welcomes the New Year 12–14 hours after Kiribati. ⏰🌏🎉
[Read more1]
[Read more2]
When does your new year start?
This post also counts as the place to send your New Years greetings/Wishes!
We wish you all a fun, fulfilling, healthy and happy New Year!
@googlefactss
#NewYear#Kiribati#TimeZones#Facts
🌍 Some Antarctic research stations use New Zealand’s time zone, while others choose the time of their home country. This means clocks at the South Pole can show different times—sometimes up to 12 hours apart. ✨
#timezones⚡#antarctica⚡#clocks⚡#geography⚡#nature⚡#earth
👉subscribe Amazing Geography
👉more Channels
🌍 The border between Norway and Russia runs along a tiny river, but despite being so far north, the local time can differ by two hours due to the countries choosing different time zones. ✨
#timezones⚡#borders⚡#Scandinavia⚡#geography⚡#nature⚡#earth
👉subscribe Amazing Geography🌍
🌍 Nepal is one of the few countries that advances its clocks by 45 minutes from standard time, using a unique offset of UTC+5:45 to better match local solar time. ✨
#timezones⚡#Nepal⚡#clocks⚡#geography⚡#nature⚡#earth
👉subscribe Amazing Geography
👉more Channels
🌍 Daylight saving time isn't used worldwide; many countries near the Equator never change their clocks because daylight hours barely vary throughout the year. ✨
#timezones⚡#daylight⚡#equator⚡#geography⚡#nature⚡#earth
👉subscribe Amazing Geography🌍
🌍 On January 1 each year, the first sunrise on Earth is usually seen in the Pacific island nation of Tonga or its neighbor, depending on the position of the International Date Line. ✨
#timezones⚡#sunrise⚡#Pacific⚡#geography⚡#nature⚡#earth
👉subscribe Amazing Geography🌍