Мы используем 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
🚀 To celebrate the partnership with @AEON_Commuinty, the leading crypto payment framework, built for AI to drive intelligent, automated payments across Web3 and simplify how crypto works in real life, we're hosting a GIVEAWAY! 🎉Total $700 Up For Grabs!
⏰May 1st, 10:00 AM - May 20th, 10:00 AM (UTC)
1️⃣$200 raffle for qualified #Galxe participants
2️⃣$500 rewards via AEON Pay for TOP and FCFS consumers
Consume $UXLINK to cover daily expenses (Each transaction must over $5).
👀Stay tuned for the upcoming announcement! In the meantime, feel free to take a sneak peek here 👉https://t.me/aeon_pay_bot
The competition is heating up, and it's time to take your skills to the next level in our #TON Capital #Galxe Campaign!⚡️
With more tasks, bigger rewards, and an even tougher playing field, the challenge is yours to conquer.
💪 Complete missions, accumulate points, and rise to the top of the leaderboards for your chance to claim extraordinary rewards. From challenges and quizzes to community actions, every task pushes you closer to victory.
🎁 The Best Will Be Rewarded:
🏆A $1000 USDT prize pool awaits the Lucky 100 on our Galxe campaign leaderboard
🏅Exclusive badges for the Lucky 500 contributors ( Galxe Explorer + Guaranteed Whitelist)
🎯Access to the Season 1 Expedition Grand Prize, worth up to $50,000 and 88.8m $TONCAP!
Join TON Capital Galxe Campaign -- https://app.galxe.com/quest/SAw9YJRiY3VF2oevPJpa3K/GCWPWtKwCQ
Show us what you’ve got and seize your opportunity to be part of something great in the world of TON and Web3.
⚡️The future is yours to shape!
🎉 Solana Leveling #Airdrop on #Galxe🎉
We’re giving away $5 to 10 lucky winners 💸
✅ Complete simple social tasks
✅ Join the Solana Leveling community
✅ Stay updated with the best Solana insights
👉 Enter here:https://app.galxe.com/quest/AygxpG3nDj4VfTNkmsTrpN/GCUxJt6zNX
🆕 Galxe now fully supports #TokenPocket login!
👉https://extension.tokenpocket.pro/
Galxe is the leading platform for building the Web3 community.
🔥Follow TokenPocket Space and Get Ready for the #TokenPocketChristmas on #Galxe!
👉https://galxe.com/TokenPocket
Details:
👉https://twitter.com/Galxe/status/1729918366012600584
👉https://twitter.com/TokenPocket_TP/status/1730068829311774726
⚡️Electra launches a quest on Galxe!
We are pleased to announce that🚀Electra launches an exciting $ELT token reward campaign on the #Galxe platform!
This means that Airdrop is just around the corner!
🏆
💵 As part of this campaign, you have the opportunity not only to earn $ELT tokens, but also to participate in prize draws in $USDT, unique NFTs and tokens from top partners🤝Electra!
Complete quests, follow the news and get ready for the $ELT airdrop!
➡️Take part in the campaign
#Electra#Airdrop#DeFi#Web3
Become an APTOS and SUI supporter and reach new peaks⛰
Go to Galxe 👇
https://galxe.com/apstation/campaign/GCLYeU42e1…
#Aptos#Galxe#AptosEcosystem#Sui#SuiEcosystem
https://twitter.com/CetusProtocol/status/1621413895578726400?s=20&t=idtvF7UcG6zXWiw2NhUUdA
@everyone
🔥Airdrop – Empeiria x Leap Wallet ✅
💠Reward:Empe Micro Node (worth $50) – Grants access to EMPE token staking rewards. Claiming starts after TGE.
☀️Airdrop Link :- Click Here
⚙️How to Participate?
♦️Jointheevent on Galxe
♦️Complete all listed quests
♦️Connect your wallet & verify tasks
♦️Secure yourEmpe Micro Node reward
📌Note:Limited-time event – don’t miss your chance to get early staking access with Empeiria
®Note - Please do your own research (DYOR) before joining to any airdrops project, also airdrop is 100% free. Don't send any fee or penny for receiving airdrop tokens.
#Empeiria#LeapWallet#Galxe#Airdropcomic#CryptoRewards#Web3