Мы используем 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
В новом докладе ЦАМТ на одной из последних страниц мы представили список коренных народов России.
Коренные народы — это те народы, которые исторически проживают на территории России и кому должна быть доступная программа репатриации.
После выхода доклада Иван Владимиров вполне заслуженно указал нам на наши огрехи — поэтому мы всё внимательно проверили, исправили ошибки и теперь с удовольствием делимся с вами проделанной работой:
https://docs.google.com/spreadsheets/d/1kDnNEgcRz-xFZE9FQvw08QXY9ZVO8zLoTEIxaGHGeEs/edit?gid=376970159#gid=376970159
🚨 $BTC #ETF Net Inflow Mar 28, 2024: +179M!
• The net inflow dropped by 26.9% compared to the previous trading day.
• The cumulative total net inflow after 54 trading days is back to $12.13B, the level before the last all-negative trading week.
• Both iShares Bitcoin Trust $IBIT and Grayscale Bitcoin Trust $GBTC significantly slowed down their respective single-day inflow and outflow for the Mar-28 trading day.
Follow @spotonchain and check out the latest updates via https://docs.google.com/spreadsheets/d/1eoMB6ivHiKhUt7MIk0fv6gxt9-OlnktfHReHMuvWduA/edit#gid=423288727
🚨 $BTC #ETF Net Inflow Mar 25, 2024: $15.4M!
• The net inflow finally turned positive after a week of being negative.
• The highest single-day net inflow belongs to Fidelity Wise Origin Bitcoin Fund $FBTC with $261.8M.
• Grayscale Bitcoin Trust $GBTC single-day net outflow remains high at $350.1M.
Follow @spotonchain and check out the latest updates via https://docs.google.com/spreadsheets/d/1eoMB6ivHiKhUt7MIk0fv6gxt9-OlnktfHReHMuvWduA/edit#gid=423288727
🚨 $BTC #ETF Net Inflow Apr 11, 2024: +91M!
• The net inflow slightly dropped by 26.6% yet remains positive.
• Both #BlackRock iShares Bitcoin Trust $IBIT and #Grayscale Bitcoin Trust $GBTC increased their single-day inflow and outflow dramatically by around 6 times from mere $33.3M and $17.5M yesterday, respectively.
Follow @spotonchain and check out the latest updates about the #Bitcoin#BTC#ETF via https://docs.google.com/spreadsheets/d/1eoMB6ivHiKhUt7MIk0fv6gxt9-OlnktfHReHMuvWduA/edit#gid=423288727
🚨 $BTC #ETF Net Inflow Apr 24, 2024: -$121M!
• The net inflow turned negative again after being positive for 3 trading days.
• #BlackRock iShares Bitcoin Trust $IBIT had zero flow, ending the streak of 72 consecutive trading days with inflows.
• The single-day outflow of #Grayscale Bitcoin Trust $GBTC rose back to $130.4M (1.95 times higher than the previous trading day).
Follow @spotonchain and check out the latest updates about the #Bitcoin#ETFs via https://docs.google.com/spreadsheets/d/1eoMB6ivHiKhUt7MIk0fv6gxt9-OlnktfHReHMuvWduA/edit#gid=202744242
🚨 $BTC #ETF Net Inflow May 1, 2024: -$564M!
• This is the largest single-day net outflow that the 10 #BitcoinETFs have ever experienced.
• All 10 Bitcoin ETFs had single-day outflows, particularly with #BlackRock iShares Bitcoin Trust $IBIT seeing the first outflow since its inception.
• The net inflow has been negative for 6 consecutive trading days, marking the longest streak ever.
Follow @spotonchain and check out the latest updates about #Bitcoin#ETFs via https://docs.google.com/spreadsheets/d/1eoMB6ivHiKhUt7MIk0fv6gxt9-OlnktfHReHMuvWduA/edit#gid=202744242
🚨 $BTC #ETF Net Inflow May 7, 2024: -$16M!
• The net inflow turned negative after 2 days of being positive.
• The #Grayscale ETF ($GBTC) re-experienced a single-day outflow of $28.6M after 2 days with inflows.
• Overall, the single-day inflows and outflows of all 10 #BitcoinETFs had slowed down significantly, with five out of ten ETFs (including #BlackRock ETF $IBIT) experiencing zero flow.
Follow @spotonchain and check out the latest updates about #Bitcoin ETFs via https://docs.google.com/spreadsheets/d/1eoMB6ivHiKhUt7MIk0fv6gxt9-OlnktfHReHMuvWduA/edit#gid=202744242
🚨 $BTC #ETF Net Inflow May 3, 2024: +$343M!
• #Grayscale Bitcoin Trust $GBTC experienced the first single-day inflow since its inception.
• The net inflow turned positive after being negative for 7 consecutive trading days.
• 8/10 #BitcoinETFs had inflows, led by #Fidelity Wise Origin Bitcoin Fund $FBTC with $102.6M, while the single-day inflow of #BlackRock iShares Bitcoin Trust $IBIT remained weak at $13M.
Follow @spotonchain and check out the latest updates about #Bitcoin#ETFs via https://docs.google.com/spreadsheets/d/1eoMB6ivHiKhUt7MIk0fv6gxt9-OlnktfHReHMuvWduA/edit#gid=202744242