Мы используем 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
To the beautiful and wonderful BeforeCoinMarketCap Community!
Sincerest wishes for health, happiness, and peace during this Holidays season and throughout the coming year! We thank you all for your unlimited contribution. We hope you stay with us, there are many interesting things this coming year!
Let the spirit of love gently fill our hearts and homes. In this loveliest of seasons may you find many reasons for happiness.
From all of us at BeforeCoinMarketCap. 💝
#BCMC1#BeforeCoinMarketCap#Crypto#BCMCToken#Airdrop#Bounty
Dear community! 💙
BCMC1 People IEO Airdrop⬇️⬇️⬇️
@bcmc_peopleIEO_airdropbot
✅ Please complete all the tasks and submit details correctly.
💰 Rewards:
- If you complete all tasks you will get 450 BCMC1.
📊Market: CoinMarketCap
💧BOUNTY💧
⏰ Airdrop will end on (UTC) or when there are 5,000 participants.
#BCMC1#BeforeCoinMarketCap#BCMC#Crypto#BCMCToken#Airdrop
🚀BeforeCoinMarketCap NEW AIRDROP🚀
💵Total Reward: 550 BCMC1
💰 Value: $8
📊Market: CoinMarketCap
click here⤵️
💎Airdrop Bot💎
☝️Don't miss out on MLM (Ongoing tokens sale with limited pool).
🥳 Invite buyers with your referral links and earn 10%
GOOD LUCK TO EVERYONE!!!✊🏻
💠Telegram
💠Telegram Channel
💠Twitter
💠Facebook
💠LinkedIn
💠YouTube
💠Website
#BCMC1#BeforeCoinMarketCap#BCMC#Crypto#BCMCToken#Airdrop
💧BeforeCoinMarketCap BOUNTY💧
(For 100 participants only💯)
Make a video about our platform: Post it on your official YouTube channel (3-5 minutes) $50 - $100 in BCMC1 token. We take into account the length and quality of the content.
Example: Please watch this videos for instructions: https://youtu.be/8t1ucZFnyL8 & https://youtu.be/aYrpgGpI074
1 Best video will receive 15,000BCMC1 ($200) and will posted on our social channels.🏆
Mandatory:
✅Describe the People IEO. (Community voting)
✅Describe the People IEO. (Participant projects)
✅Explain the MLM system (Ongoing token sales)
❗️Notice: The channel must have Minimum of 1000 subscribers. Your email will be blacklisted if you submit an old video link or if you do not follow the instructions given.
#BCMC1#BeforeCoinMarketCap#BCMC#Crypto#BCMCToken#bounty#Bounty
💎 BeforeCoinMarketCap New BOUNTY 💎
For 100 participants only💯
Bounty Tasks✅
Make a video about our platform: Post it on your official YouTube channel (3-5 minutes) $50 - $100 in BCMC1 token. We take into account the length and quality of the content.
📍Mandatory:
1. Describe the search window.
2. Describe the Announcement window
3. Explain the MLM system (Ongoing token sales):
4. Describe the promotion website
Best video will receive 20,000BCMC1 ($300) and will posted on our social channels.
📍Bounty Google Form
Notice: The channel must have Minimum of 1000 subscribers. Your email will be blacklisted if you submit an old video link or if you do not follow the instructions given.
#BCMC1#BeforeCoinMarketCap#BCMC#Crypto#BCMCToken#Bounty