Мы используем 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
🇺🇿 Joriy yilning 20-noyabr kuni O‘zbekiston Respublikasi Vazirlar Mahkamasi huzuridagiBiznes va tadbirkorlik oliy maktabida“O‘zbekistonda soliq sohasidagi islohotlar” mavzusida mahorat darsi tashkil etildi.
💻Ushbu darsda O‘zbekiston Respublikasi Iqtisodiyot va moliya vazirligi huzuridagi o‘quv markazi Davlat moliyasi kafedrasi katta o‘qituvchisi – Aripova Nasiba Azadovna o‘zlarining taqdimotlari bilan ishtirok etdilar.
Batafsil ma'lumot uchun🖥
#GraduateSchool#MasterClass#Tax
🔝Web-site |🔝Facebook | 🔝Instagram | 🔝Youtube
💵50 dollars instead of 10: Bali wants to raise tourist tax
📰 Bali's regional legislative council is proposing to increase the tax on foreign tourists to 750,000 rupiah ($50). The reason is the desire to attract more affluent and solvent travelers and avoid problems related to their bad behavior and disorderly conduct.
If we go to England, we will give 5.7 million rupiah for a visa. Why should Bali be sold cheap?
✔️Bali tourism officials are going to conduct spot checks of travelers twice a month at the island's main attractions. Travelers will have to show proof that they have paid the tourist tax and provide their QR code to be scanned.
@BaliNews
#laws#tourism#tax
Breakingviews TV: Rates of change
Countries that account for more than 90% of global GDP signed a landmark deal to introduce a 15% minimum corporate tax. But Liam Proud says the plan strayed a long way from its original purpose of giving the rules a digital revamp.
#News#Reuters#Breakingviews#tax
Subscribe: http://smarturl.it/reuterssubscribe
Reuters brings you the latest business, finance and breaking news video from around the globe. Our reputation for accuracy and impartiality is unparalleled.
Get the latest news on: http://reuters.com/
Follow Reuters on Facebook: https://www.facebook.com/Reuters
Follow Reuters on Twitter: https://twitter.com/Reuters
Follow Reuters on Instagram: https://www.instagram.com/reuters/?hl=en
➖@reutersworldchannel➖
Why do billionaires and other very rich individuals try so hard to avoid paying taxes when they will still be rich whether they pay the taxes or not?
#Reddit#tax#discussion
👥Diskusi Perpajakan
Grup membahas seputar permasalahan perpajakan serta aplikasi yang dirilis DJP. Grup ini membahas Pajak Pusat. PPh, PPN, PBB P3.
Bukan grup resmi DJP atau terafiliasi dengan DJP.
#tax#pajak#channel#group
Crypto Tax Boosts Kyrgyz Budget
Kyrgyz government's 2024 budget includes $535,000 from cryptocurrency mining taxes. The tax rate is set at 10% of electricity bills used for mining. Details available in the budget document here.
#Kyrgyzstan#Crypto#Tax#Mining#Bitcoin