Мы используем 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
💎#HoldCoin is taking the world by storm!
🔥 Major media outlets like Cryptoate, Cryptomanias, Geekocoin, Digital Journal, and Benzinga have all reported on HoldCoin. 💎
Does this mean some big events are just around the corner? 🐂
Keep holding #Hold! Follow our channel and X to get the latest updates on the TGE as soon as they drop! 🚀
🎉HoldCoin Avatar Challenge is ON!
🎉
🚀 Update your avatar with the exclusive HoldCoin badge in TokenSpritz_bot and WIN big!
🖥Event Duration: Dec 20 – Dec 27
💰Prize Pool: $500 USDT in $HOLD!
🔑How to Join:
1️⃣ Go to TokenSpritz_bot and update your avatar with the HoldCoin badge.
2️⃣ Contact the admin for verification in the HoldCoin community: @martian_0x
3️⃣ Rewards will be sent at the end of the event!
🔥 Don’t miss your chance to shine and earn $HOLD rewards! 🏆
👉 Join now:@Holdcoin_Group
#Web3#Crypto#HOLD#Airdrops#TON
🚀 $HOLD/USDT Futures Will Be Listed on 13:15, December 16 (UTC) on #MEXC - Offering Adjustable Leverage of Up to 50x!
More Info👇
https://www.mexc.com/support/articles/17827791520467
#HOLD#MEXCFutures
🤩Fintopio is a new non-custodial wallet in the TON ecosystem
#Fintopio is a cryptocurrency wallet in🪙 Telegram, which can be used via mini app and website. With its help, you can conveniently use #DeFi and #CeFi functions, pay bills, divide expenses, buy goods and transfer money without leaving the application.
To get started quickly, you can import an existing wallet:
🟡Open "DeFi" tab in the Fintopio app
🟡 Click "View all"
🟡 Next – “Import wallet”
🟡 Enter your 12-word secret phrase to import your wallet
👛Currently the wallet supports: #BTC, #USDT [#ERC20/#TRC20], #ETH, #TRX and #TON.
📲 The project has a game to attract an audience where $HP (Hold Points) are farmed. You need to collect coins every 8 hours and in the future you can exchange them for the main utility token of Fintopio named $HOLD.
The token is only available to early participants of the project, the more you #HOLD, the more rewards you will receive from Fintopio.
So it's better to start right now!🚀
Game | Channel | Website
🚀 Grab #CDB#Tokens NOW Before They Hit $0.015 in Jan 2025!
⏳ Only a Few Days Left!
#Stake, #hold, & prepare for #BIG profits with the $0.020 listing #coming in Feb 2025!
💥 Don’t Miss Out—Act #Fast!
🔗https://cloudatabox.com/register?ref_code=6515554&pos=right
#CDBToken#CryptoProfits#StakeAndEarn#Cloudatabox