Мы используем 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
It’s May the 4th! Saving the earth is in your hands, so may the force be with you.
Like ice cream in this hot Singapore weather, the earth’s great ice caps are melting due to global warming! It’s time to ask ourselves if we have done enough for the earth. If not, start here: www.mewr.gov.sg/climateaction#ClimateActionSG
💰 Save around $80 annually when you upgrade your refrigerator from 1-tick to 3-tick or above!
🌱 Take climate action by switching to more energy- and water-efficient appliances with your Climate Vouchers!
The Climate Friendly Households Programme now offers:
🎉 Additional $100 in Climate Vouchers, on top of the $300 in 2024 for eligible HDB households (total $400!)
🏠 Now extended to all Singapore Citizen households in private properties too
⏰ Valid until 31 Dec 2027
👉 For more details: go.gov.sg/cfhp-info
#EnergyEfficiency#ClimateActionSG#SustainableSG
💡✨ Bright savings are just a switch away. Switch 5 compact fluorescent lamps for 2-tick LED bulbs and save $32 a year!
Take climate action by switching to more energy- and water-efficient appliances with your Climate Vouchers.
✅ The Climate Friendly Households Programme now offers an additional $100 in Climate Vouchers, on top of the $300 offered in 2024 for eligible HDB households.
✅ The programme has also been expanded to include Singapore Citizen households living in private residential properties in 2025.
✅ This means that all eligible HDB and private households have been issued $400 worth of Climate Vouchers.
These vouchers are valid until 31 Dec 2027.
More details at go.gov.sg/cfhp-info
#EnergyEfficiency#ClimateActionSG#SustainableSG
💰𝗖𝗼𝗼𝗹 𝘀𝗮𝘃𝗶𝗻𝗴𝘀 𝗮𝗹𝗲𝗿𝘁! Upgrade to a 5-tick air-conditioner and enjoy about $450 savings in utilities a year compared to a 1-tick model.
Take climate action by switching to more energy- and water-efficient appliances with your Climate Vouchers.
The Climate Friendly Households Programme now offers an additional $100 in Climate Vouchers, on top of the $300 offered in 2024 for eligible HDB households. The programme has also been expanded to include Singapore Citizen households living in private residential properties in 2025. This means that all eligible HDB and private households have been issued $400 worth of Climate Vouchers. These vouchers are valid until 31 Dec 2027. More details at go.gov.sg/cfhp-info
#EnergyEfficiency#ClimateActionSG#SustainableSG
The Climate Friendly Households Programme now offers an additional $100 in Climate Vouchers, on top of the $300 offered in 2024. It has been expanded to include Singapore Citizen households in private residential properties on top of eligible HDB households.
Take climate action by switching to more energy- and water-efficient appliances with your Climate Vouchers. The vouchers are valid until 31 Dec 2027.
Visit go.gov.sg/climatevouchers for more info.
#ClimateActionSG#SustainableSG#EnergyEfficiency
It's #EarthHour tonight! Don’t forget to turn off all your lights at 8.30pm today. And because we only have one earth, let’s ensure we use our resources wisely. Read more here: earthhour.org
#ClimateActionSG
#SGBudget2025 The enhanced Climate Friendly Households Programme will now cover around 90% of households in Singapore!
From 15 Apr 2025, eligible HDB households will receive an additional $100 in Climate Vouchers, on top of the existing $300 offered in 2024.
The programme will also be expanded to include Singapore Citizen households living in private residential properties.
This means that eligible households staying in HDB and private residential properties can claim a total of $400 worth of Climate Vouchers! These vouchers are valid until 31 Dec 2027.
More info at go.gov.sg/nea-cos2025-cv
#ClimateActionSG#SustainableSG
This year's theme, 'Creating Resilient Communities through Disaster Risk Reduction and Climate Change Mitigation and Adaptation’, highlights the urgent need to build stronger, more adaptable communities in the face of global challenges.
By taking climate actions such as practising the 3Rs and adopting energy-saving habits, all of us can play a part in building a more resilient and #SustainableSG🌱💪
#WorldEnvironmentalHealthDay#SustainableSG#ClimateActionSG
Building climate resilience will keep Singapore steady pom pi pi for the next 60 years! 💃🕺
Let’s take action for a #SustainableSG by adopting energy-saving and #ReduceReuseRecycle habits.
#SG60#ClimateActionSG