Мы используем 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
#HOOK/USDT analysis :
#HOOK has successfully broken out from the trendline and subsequently retested it, indicating a shift in direction towards the upside.
This suggests that bullish momentum is likely to persist, with potential for testing higher price levels in the near future.
TF : 4h
Entry : $0.2850
Target : $0.3240
SL : $0.2716
#HOOK/USDT analysis :
#HOOK is in a downtrend, trading below the 200 EMA. The price is currently experiencing a pullback and is expected to test the resistance zone before continuing its bearish trend. The price is expected to test the resistance zone while continuing its bearish momentum to test previous lows.
TF : 4H
Entry : $0.4173
Target : $0.3485
SL : $0.4477
#HOOK/USDT analysis :
#HOOK is in a downtrend, expected to keep up its bearish momentum. The price has already broken out of the trendline, triggering the entry. Target the previous swing low as a potential target level.
TF : 15min
Entry : $0.3558
Target : $0.3208
SL : $0.3746
#HOOK/USDT analysis :
#HOOK has broken out of the trendline with impulsive bullish momentum. It is expected to test the previous swing high. Aim for it as a potential target level, as bullish momentum is expected to continue on LTF.
TF : 5min
Entry : $0.3475
Target : $0.3696
SL : $0.3332
#HOOK/USDT analysis -
#HOOK shows a rejection from the resistance zone after establishing a lower low. There is an anticipation of further decline from this point with a potential retest of the previous low. For a short entry, wait for a pullback to the resistance zone.
TF : 2h
Entry : $0.4959
Target : $0.4003
SL : $0.5155
#HOOK/USDT analysis -
#HOOK is currently in a downtrend, hitting new lows and trading below the 200 EMA. The price is currently testing the resistance zone after an impulsive move. It is anticipated that the price will reject from there and continue to test new lows shortly. Enter when the price begins declining from the resistance zone. The previous swing low will be the target level.
TF : 1h
Entry : $0.5767
Target : $0.5316
SL : $0.6036
#HOOK/USDT analysis -
#HOOK is in a downtrend, trading below the 200 EMA. The price is currently going through a pullback and has retraced to previous support levels near the 200 EMA. Currently, the price is encountering resistance near the 200 EMA and has already broken the trendline, indicating an increase in bearish pressure on the price. To confirm entry, wait for the price to break below the $0.5997 level to go short, with previous swing lows as potential target levels.
TF : 30min
Entry : $0.5997
Target : $0.5446
SL : $0.6337