Мы используем 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
President Biden honors fallen police officers
President Joe Biden spoke to hundreds of uniformed officers at a memorial service to honor law enforcement officers who lost their lives in the line of duty
#JoeBiden#News#Reuters
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➖
Biden says U.S. ports open 24/7 a 'game-changer'
U.S. President Joe Biden launched an effort to ease supply chain blockages that are threatening to disrupt the U.S. holiday season, relying on expanded round-the-clock port and shipping operations.
#News#Reuters#JoeBiden
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➖
Biden calls for Democrat unity ahead of mid-terms
President Biden appealed for unity within the Democratic party to get his infrastructure and social spending plans through to the American people
#JoeBiden#News#Reuters
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➖
https://x.com/SavinoBalzano/status/1815087418912993448?t=v_o45bevej_RsJbbRsr-xw&s=19
La notizia vera? Ha firmato correttamente #JoeBiden: pare stesse per scrivere #DonaldTrump.
Si chiude una parentesi tristissima: un uomo palesemente bollito si fa da parte.
Oggi a dirlo sono tutti, solo qualche mese fa ci facevano passare per matti.
The US has sanctioned 21 Venezuelan officials, including military commanders, intelligence heads, and ministers, freezing their US-based assets and restricting visas.
Caracas condemned the measures, calling them part of a 'failed regime change policy.' The sanctions come after Washington supported the opposition's disputed election claims.
Learn more here: https://shorturl.at/ggDjj
#JoeBiden#OFAC#sanctions
In his last interview as president of the United States, Joe Biden tells the story of his first meeting with Netanyahu in Israel after October 7. Bibi told Joe: “We did in Gaza what you did in Berlin.”
#UnitedStates#JoeBiden#BenjaminNetanyahu#Israel#Gaza#Palestine
Biden meets Kenyan President Uhuru Kenyatta
President Joe Biden told visiting Kenyan President Uhuru Kenyatta that the United States will make a one-time donation of more than 17 million doses of the Johnson & Johnson vaccine to the African Union.
#News#Reuters#JoeBiden#UhuruKenyatta#COVID#vaccine
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➖
https://x.com/SavinoBalzano/status/1858430435358863776?t=VUJsK-vlRVQEBXJhqfqa-w&s=19
Ve la ricordate la storia del barbaro oscurantista #Trump? Quello che non avrebbe mai accettato l’esito del voto qualora avesse vinto #Harris?
Ebbene, mi domando dove siano tutti quei giornalisti, quegli opinionisti, quegli augusti intellettuali che ci mettevano in guardia dalla furia antidemocratica di #DonaldTrump.
Nonostante l’esito elettorale, infatti, l’amministrazione di #JoeBiden ha deciso di autorizzare l’#Ucraina a utilizzare le armi statunitensi nel territorio della #Russia. Vi pare accettabile che una decisione di tale portata, la quale ha impegnato il dibattito pubblico occidentale letteralmente per anni, venga in definitiva assunta da chi è in uscita dopo che la sua parte politica è stata bocciata per quanto realizzato, letteralmente stracciata in occasione delle ultime presidenziali?
Ovviamente la determinazione non è riconducibile alla persona del Presidente uscente: quello non si ricorda nemmeno il suo stesso nome. È da ricondurre all’establishment democratico, all’amministrazione di cui #KamalaHarris, l’eroina dei sinistri lobotomizzati di tutto il mondo, è vicepresidente.
La campagna elettorale di #Trump non lasciava spazio ad alcuna ambiguità ed è per questo che ha stravinto: ha promesso la fine dell'escalation nel conflitto. Nonostante l’elettorato sia stato chiarissimo, l’amministrazione uscente forza la mano, prova un gravissimo colpo di coda: alla faccia della transizione pacifica!
Come vedete, al di là della scialba retorica perbenista e salottiera c’è la verità, la realtà dei fatti: una parte dell’Occidente brama la guerra totale, lo scontro diretto con la Russia. Il tentativo è chiarissimo: si cerca l'incidente definitivo, quello che costringerà il futuro Presidente in un giogo senza alternative.
L’unica speranza è che, di qui al 20 gennaio, le gravissime provocazioni non vengano raccolte: saranno due mesi davvero pericolosissimi.
The Venezuelan government has rejected the Biden administration’s latest employment of “worn-out intervention strategies” by recognizing former opposition candidate Edmundo González Urrutia as “president-elect.”
The statement emphasized that Venezuela would respond with “firmness” and “dignity” to “any attempt to undermine stability or incite violence.”
Caracas has broken diplomatic ties with Paraguay's President Santiago Peña for hosting González in what the Venezuelan government has called an act of subordination to “the interests of foreign powers.”
Read the article → https://shorturl.at/qpLo7
#Venezuela#Washington#Paraguay#NicolásMaduro#EdmundoGonzález#JoeBiden
Il mondo occidentale si affida alla guida di un nonnetto rincitrullito.
In una delle parentesi più drammatiche e delicate della nostra storia recente, siamo in balia delle nebbie di un uomo finito.
Questa è la verità.
La mia al TG Plus di Cusano Italia TV
#italia#politica#attualità#notizie#informazione#dibattito#televisione#Biden#JoeBiden#usa#giornalismo
https://www.youtube.com/watch?v=6onPU8ekk5o&ab_channel=SavinoBalzano
President Joe Biden enlists Walmart, FedEx to fix bottlenecks
President Joe Biden urged the private sector to help ease supply chain blockages that are threatening to disrupt the U.S. holiday season and said the White House plans a nationwide overhaul of the clogged system.
#JoeBiden#supplychain#Walmart#FedEx#UPS#News#Reuters
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➖
#Trump o #Biden?
Temete che gli #StatiUniti siano guidati dai populisti? Temete che gli #Usa siano guidati dai facinorosi? Temete che l'#America sia totalmente soggiogata dalla retorica della violenza e della guerra?
L'estremismo non vi fa dormire la notte? L'#OndaNera vi provoca stitichezza? Allora non è per Biden che dovete "tifare".
#DonaldTrump#JoeBiden
https://x.com/SavinoBalzano/status/1806564599740637638