Мы используем 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
🪐 In 2021, scientists using the LIGO and Virgo detectors observed gravitational waves from a collision between two massive black holes named GW200129, located over 5 billion light-years away. What made this discovery unusual was the strong "precession" of the black holes’ orbits—a wobble much like a spinning top—which had never been clearly seen before, opening a new way to study how spinning black holes merge and ripple through the fabric of space. ✨
#gravitationalwaves⚡#blackholes⚡#space-time ⚡#nasa⚡#galaxy⚡#stars⚡#astronomy⚡#universe⚡#cosmos⚡#space
👉subscribe Universe Mysteries
👉more Channels
🪐 In 2016, scientists using the Laser Interferometer Gravitational-Wave Observatory (LIGO) made history by detecting gravitational waves from the collision of two black holes over a billion light-years away. Gravitational waves are actual ripples in the fabric of space itself, created when massive objects like black holes or neutron stars crash together, letting astronomers "hear" cosmic events that were invisible before. ✨
#blackholes⚡#gravitationalwaves⚡#space-time ⚡#nasa⚡#galaxy⚡#stars⚡#astronomy⚡#universe⚡#cosmos⚡#space
👉subscribe Universe Mysteries
👉more Channels
🪐 In 2023, astronomers announced the very first detection of gravitational waves coming from the collision of two supermassive black holes—giant black holes millions of times heavier than the Sun—located in distant galaxies. These faint ripples in space-time were picked up using pulsar timing arrays, which rely on ultra-precise measurements of radio pulses from rapidly spinning neutron stars, revealing a whole new side of the universe where invisible titans shape the cosmos with their dances and crashes. ✨
#gravitationalwaves⚡#blackholes⚡#galaxies⚡#nasa⚡#galaxy⚡#stars⚡#astronomy⚡#universe⚡#cosmos⚡#space
👉subscribe Universe Mysteries
👉more Channels
🪐 In 2023, scientists using the Laser Interferometer Space Antenna (LISA) Pathfinder technology prepared for future space-based detection of gravitational waves—tiny ripples in space made by massive events like black hole collisions. Unlike Earth-based detectors, LISA will measure these waves from space, opening a new window to observe cataclysmic events in galaxies millions of light-years away and revealing secrets hidden by cosmic dust and distance. ✨
#gravitationalwaves⚡#blackholes⚡#galaxies⚡#nasa⚡#galaxy⚡#stars⚡#astronomy⚡#universe⚡#cosmos⚡#space
👉subscribe Universe Mysteries
🪐 In 2019, gravitational wave detectors LIGO and Virgo picked up GW190814—a signal from the merger of a black hole about 23 times the mass of the Sun and a mysterious compact object weighing just 2.6 solar masses. This lighter object is too heavy for known neutron stars but lighter than any confirmed black hole, creating a real cosmic mystery and challenging scientists to rethink what kinds of objects can exist in the universe. ✨
#gravitationalwaves⚡#blackholes⚡#mysteries⚡#nasa⚡#galaxy⚡#stars⚡#astronomy⚡#universe⚡#cosmos⚡#space
👉subscribe Universe Mysteries
👉more Channels
🪐 In 2020, astronomers made a pioneering discovery by detecting gravitational waves from the merger of a black hole and a neutron star in a distant galaxy. Gravitational waves are ripples in space caused by massive objects accelerating or colliding, and finding this "mixed" merger—between a dense neutron star and a black hole—helped confirm that such pairs really exist and can dramatically reshape the universe. ✨
#gravitationalwaves⚡#blackholes⚡#neutronstars⚡#nasa⚡#galaxy⚡#stars⚡#astronomy⚡#universe⚡#cosmos⚡#space
👉subscribe Universe Mysteries
👉more Channels
🪐 In July 2023, the NANOGrav collaboration announced the detection of a subtle, continuous "hum" of gravitational waves rippling through the Milky Way, likely created by pairs of supermassive black holes orbiting each other in distant galaxies. Gravitational waves are tiny ripples in space itself, first predicted by Einstein, and their detection with pulsar timing arrays—using rapidly spinning stars that act as cosmic clocks—opens a new era for exploring invisible giants and the history of galaxy mergers across the universe. ✨
#gravitationalwaves⚡#pulsars⚡#blackholes⚡#nasa⚡#galaxy⚡#stars⚡#astronomy⚡#universe⚡#cosmos⚡#space
👉subscribe Universe Mysteries
🪐 In 2023, scientists using pulsars—ultra-dense, spinning stars that emit radio pulses like cosmic clocks—detected a faint background hum of gravitational waves rippling through our galaxy. These gravitational waves, created by supermassive black holes merging in distant galaxies, gently stretch and squeeze the fabric of space, opening an entirely new window into the universe’s most titanic collisions. ✨
#gravitationalwaves⚡#pulsars⚡#blackholes⚡#nasa⚡#galaxy⚡#stars⚡#astronomy⚡#universe⚡#cosmos⚡#space
👉subscribe Universe Mysteries
🪐 In 2015, the twin LIGO detectors in the United States made a groundbreaking discovery by directly detecting gravitational waves—tiny ripples in the fabric of space itself—caused by two black holes merging about 1.3 billion light-years away. This event, called GW150914, proved that space can literally shake, confirming a century-old prediction by Einstein and opening a whole new way to "listen" to the universe beyond just observing light or radio waves. ✨
#gravitationalwaves⚡#blackholes⚡#discovery⚡#nasa⚡#galaxy⚡#stars⚡#astronomy⚡#universe⚡#cosmos⚡#space
👉subscribe Universe Mysteries
👉more Channels
🪐 In 2023, astronomers using gravitational wave observatories detected GW230307, a signal from the merger of two neutron stars in a distant galaxy. Neutron stars are the incredibly dense cores left behind after supernova explosions, and their collision sent ripples—gravitational waves—through space itself, allowing scientists to study the properties of matter squeezed far beyond anything found on Earth. ✨
#gravitationalwaves⚡#neutronstars⚡#collisions⚡#nasa⚡#galaxy⚡#stars⚡#astronomy⚡#universe⚡#cosmos⚡#space
👉subscribe Universe Mysteries
👉more Channels
🪐 Some gamma-ray bursts last less than two seconds and are thought to result from the collision of two neutron stars—ultra-dense remnants of massive stars that pack more mass than the Sun into a space the size of a city. In 2017, the galaxy NGC 4993, about 130 million light-years away, was the site of such a collision, allowing astronomers to observe both gamma rays and gravitational waves from the same cosmic event—a rare glimpse into the most violent mergers in the universe. ✨
#gamma-ray ⚡#neutronstar⚡#gravitationalwaves⚡#nasa⚡#galaxy⚡#stars⚡#astronomy⚡#universe⚡#cosmos⚡#space
👉subscribe Universe Mysteries
👉more Channels
🪐 In 2020, astronomers detected gravitational waves from the merger of two black holes with highly unequal masses—one about nine times heavier than the other—in a distant galaxy. This unusual event, named GW190814, created a final object weighing about 142 times the mass of our Sun, providing the first strong evidence for so-called "intermediate-mass" black holes that fill the mysterious gap between stellar and supermassive black holes. ✨
#gravitationalwaves⚡#blackholes⚡#discoveries⚡#nasa⚡#galaxy⚡#stars⚡#astronomy⚡#universe⚡#cosmos⚡#space
👉subscribe Universe Mysteries
👉more Channels