Мы используем 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
💥Simple guide on Soneium
Galxe quest
✅L2 By Sony 💿
💯FREE
👇Steps
🔗https://app.galxe.com/quest/Soneium/
✅Complete social task
✅Go to second quest page
✅Complete social task
✅Mint first day NFT
✅Mint daily NFTs
✅Claim points
💥Done
#Soneium
💿 Soneium is now live on TokenPocket!
#Soneium is a Layer 2 blockchain that empowers creators, fans, and communities to protect their rights, connect globally, and build an open internet that transcends boundaries.
💙Get started to easily create, import, and sync your #Soneium wallet on TokenPocket!
👉https://tokenpocket.pro
Crypto Funds Struggle Compared to Bitcoin
OKX's founder Star claims no crypto fund has outperformed Bitcoin over the last decade, predicting a 100x growth for the industry. He acknowledged feedback on OKB's lack of use cases and poor listings. A new secret business line for OKX is set to launch in February.
In other news, Ethereum spot ETFs saw a net outflow of $39.432 million, while Bitcoin ETFs faced a larger outflow of $284 million. Notably, BlackRock's ETHA and IBIT ETFs saw significant inflows.
Read more about OKX's updates here, Ethereum's ETF activity here, and Bitcoin's ETF activity here.
#OKX#Bitcoin#Ethereum#Crypto#ETFs#BlackRock#OKB#NFTs#Web3#DeFi#Soneium#S.BLOX #Blockchain#Investing#Finance#BitcoinETF#EthereumETF#VC#AI
Sony Launches Blockchain Platform Soneium
Sony's public blockchain platform, *Soneium*, has officially launched on the mainnet. This initiative aims to enhance its technology offerings in the blockchain space. Read more here.
In a historic move, Italy's largest bank, *Intesa Sanpaolo*, has purchased 11 bitcoins valued at around €1 million, marking the first direct crypto transaction by a financial institution in Italy. Details can be found here.
FTX/Alameda has redeemed and transferred 182,421 SOL (approx. $32.35M) today, raising the total since last November to 4.445M SOL (approx. $516.88M). The staked address currently holds 6.47 million SOL (approx. $1.18B). More information here.
The US Court of Appeals ruled in favor of *Coinbase* in its case against the SEC, deeming the SEC's denial of rulemaking as “arbitrary and capricious.” This case revolves around establishing rules for digitally native asset securities. For further reading, click here.
#Sony#Blockchain#Soneium#Bitcoin#ECB#Italy#IntesaSanpaolo#CryptoTransactions#FTX#SOL#Coinbase#SEC#DeFi#DigitalAssets#Cryptocurrency#Finance#Investing#VentureCapital#CryptoNews#CryptoMarket