Мы используем 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
❗Объем торгов на ITS в июне составил $11,9 млн
Объем торгов акциями и депозитарными расписками на международной торговой площадке ITS по итогам июня составил $11,9 млн. Общее количество сделок с акциями и депозитарными расписками международных компаний составило 2795 сделок.
В топ-10 лидеров по объему торгов вошли акции Tesla, Marathon Digital Holdings, AMD, Coinbase Global, Exxon Mobil Corporation, Baidu, Virgin Galactic Holdings, MicroStrategy Incorporated, Li Auto, JD.com.
Торги стартовали 7 июня 2023 года и с первого дня инвесторам стали доступны 1570 акций и депозитарных расписок компаний из США, Европы и Азии с первичным листингом на американских биржах NYSE и NASDAQ.
#торги
#ITS
i get that people are more comfortable with defined rules and structure but i also think queer people lost when they started resorting to dictionary definitions for what labels mean
the queer umbrella is meant to deviate from the norm of rigid boxes and definitions and to decide that lesbian means Only this, bi means Only this, etc, is directly contradicting what queer means. each and every label is going to have a unique meaning to the person using it and that is how it’s supposed to be. if you’re not comfortable with that…sorry?
basically if someone tries to tell you you’re using a label wrong:
[image description: a set of tumblr tags from @/elinaline, reading: “#there is a way to use a label wrong actually; #its when you force it on someone else”. end image description.]
this is the only answer i’ll accept thank u everyone for your participation <3
https://genderkoolaid.tumblr.com/post/689713705918791680
i get that people are more comfortable with defined rules and structure but i also think queer people lost when they started resorting to dictionary definitions for what labels mean
the queer umbrella is meant to deviate from the norm of rigid boxes and definitions and to decide that lesbian means Only this, bi means Only this, etc, is directly contradicting what queer means. each and every label is going to have a unique meaning to the person using it and that is how it’s supposed to be. if you’re not comfortable with that…sorry?
basically if someone tries to tell you you’re using a label wrong:
[image description: a set of tumblr tags from @/elinaline, reading: “#there is a way to use a label wrong actually; #its when you force it on someone else”. end image description.]
this is the only answer i’ll accept thank u everyone for your participation <3
https://genderkoolaid.tumblr.com/post/689713705918791680