Мы используем 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
🐶Lost Dogs:The Way👣
Today we need to choose the “average” card. Will Rex go on the expedition?
1. Expedition is On🧗♂️
2. Expedition is Off🚫
3. He Went Alone🌲
I think He Went Alone🌲 will be the average choice.
👉Let’s join the next battle!
Share your thoughts in the comments!
➖
📣Stay tuned! Subscribe!
➖
#lostdogs#crypto#cryptogame
🐶Lost Dogs: The Way 👣
Today we need to choose the “average” card. How will the dogs deal with the infected?
1. Quarantine 🧪
2. Do Nothing 🛑
3. Kill the Infected ⚔️
I think Quarantine 🧪will be the average choice.
👉Let’s join the next battle!
Share your thoughts in the comments!
➖
📣Stay tuned! Subscribe!
➖
#lostdogs#crypto#cryptogame
➖
🐶Lost Dogs:The Way -
🏆Last Round’s Winner: Survival Kit🧰
📝New Challenge: What will the Cat do next?
(Find the unpopular card)
1. To Wash 🧼
2. Track Down Gavkus 🐾
3. Summon Darkness 🌑
🔍 Analyze carefully before making your choice!
🔔Subscribe👉Join Lost Dogs
—————————————————
#lostdogs#crypto#dogs
🐶Lost Dogsis officially out!
This is not just another slipper. This is a community driven story where you can mine the new $WOOF token.
The season will last only 6 weeks!
🤪Join our clan, as usual we will try to rise to the top and earn more $NOT
The team has released a useful guide, thanks to which you can understand the game and its interesting plot, which you control yourself!
Play here @lost_dogs_bot
#Notcoin#GameFi#LostDogs#TON#NOT
🐶Lost Dogs:The Way -
🏆Last Round’s Winner: Fireworks🎆
📝New Challenge:
Which tactic to choose? (Find an average card)
1. Surround 🌀
2. Frontal Attack 🚀
3. Fake Retreat 🎭
🔍Analyze carefully before making your choice!
🔔Subscribe👉Join Lost Dogs
—————————————————
#lostdogs#crypto#dogs
#cryptogame#nftgaming
🐶Lost Dogs:The Way -
🏆 Last Round’s Winner: Decryption Machine
📜New Challenge:
How to handle the new information? (Find the average card)
1. Tell Everyone 📢
2. Hide the Truth 🔥
3. Defuse 🛡️
🔍Analyze carefully before making your choice!
🔔Subscribe👉Join Lost Dogs
—————————————————
#lostdogs#crypto#dogs
#cryptogame#nftgaming
🐶Lost Dogs:The Way -
🥇 Last Round’s Winner:
The winning card in the last game was Go Underground🌿
🚀New Challenge:
What truth will the Resistance reveal? (Find the average card)
1. Greed of the Cult 🪙
2. About Religious Lies 📖
3. How to Resist 🛠
🔍Analyze carefully before making your choice!
🔔Subscribe👉Join Lost Dogs
—————————————————
#lostdogs#crypto#dogs
#cryptogame#nftgaming
🐶Lost Dogs:The Way -
🥇 Last Round’s Winner:
The winning card in the last game was Kidnap🐾
🚀New Challenge:
How can Resistance continue the fight? (Find the unpopular card)
1. Invite Newcomers 👥
2. Go Underground 🌿
3. Pirate Radio 🎙
🔍Analyze carefully before making your choice!
🔔Subscribe👉Join Lost Dogs
—————————————————
#lostdogs#crypto#dogs
#cryptogame#nftgaming
🐶Lost Dogs:The Way -
🏆 Last Round’s Winner: The winning card in the last game was Fend Off in Battle! 🛡️
🚀New Challenge:
How should the Resistance Dogs handle the newly born mutant messiah? (Find the average card) 👣
1. Kidnap 🐾
2. Kill ⚔️
3. Unveil the Origin 🔍
Analyze carefully before making your choice!🧐
🔔Subscribe👉Join Lost Dogs
—————————————————
#lostdogs#crypto#dogs
#cryptogame#nftgaming
🐶Lost Dogs:The Way -
🏆 Last Round’s Winner: The winning card in the last game was Wisdom! 👣
🚀New Challenge:
How will they rescue Genghis Gaf, and will they?
1. Fend Off in Battle🔥
2. Stay Low 🏠
3. Rescue Secretly 🤘
Analyze carefully before making your choice!
🔔Subscribe👉Join Lost Dogs
—————————————————
#lostdogs#crypto#dogs
#cryptogame#nftgaming
🐶🐶Lost Dogs: The Way - 🏆Last Round’s Winner: The winning card in the last game was Fight Back!👣
🚀New Challenge:
What are the dogs expecting from their beloved wizard's performance?
1. Underground Firework 🎆
2. New Day 🌅
3. Existence’s Purpose 🔮
Analyze carefully before making your choice!
🔔Subscribe👉Join Lost Dogs
—————————————————
#lostdogs#crypto#dogs
#cryptogame#nftgaming
🐶Lost Dogs: The Way -
🏆Last Round’s Winner: The winning card in the last game was Secret Comlink! 👣
🚀New Challenge:
What should the dogs do during the raid?
1. Fight Back🥊
2.Run Away🏃♂️
3.Negotiate🤝
Analyze carefully before making your choice!
🔔Subscribe👉Join Lost Dogs
—————————————————
#lostdogs#crypto#dogs
#cryptogame#nftgaming