Мы используем 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
Il Partito Libertario (#LP) 🇺🇸 ha scelto la propria candidata, che correrà contro Biden (D) e Trump (R) per l'elezione a Presidente degli Stati Uniti.
Si tratta di Jo Jorgensen: chi è questa candidata, e quali sono le caratteristiche del Partito Libertario?
🎙 sintonizzati alle 18 sul nostro Instagram per seguire la diretta con @elezioniusa2020 in cui parleremo anche di lei!
✒️ Alessandro Carrata
▶️ vai al profilo della candidata
NewDEX on TON launching November 19!
💰TONCO — the first DEX on TON with concentrated liquidity! Mainnet launch date: November 19. Algebra Labs, the creators of the exchange, promise increased yields for liquidity providers and reduced price impact for traders.
Key Benefits of TONCO:
✔️High capital efficiency – LPs can position their liquidity within specific price ranges, maximizing fee income by "concentrating" liquidity where it’s needed most.
✔️Reduced slippage – Traders gain access to deeper liquidity in active price ranges, resulting in better trade execution.
✔️Risk management – Liquidity providers can adjust their positions to minimize or avoid impermanent loss.
✔️Increased fee earnings – Concentrating liquidity in selected price ranges can lead to higher trading volumes in those areas.
⏺Testnet is already live!
Testnet address: testnet.tonco.io
Wallet setup for Testnet — instructions
Complete guide to the testnet: here
⚙️How to join the testnet:
Test swaps, pools, and farming features. Share your feedback on the platform to join the rewards program for early users! 👤Access by invitation. You can request an invite in the project’s chat here.
🤑Users participating in the testnet will receive exclusive bonuses!
For more about the project, check out their recent AMA with 🏙 bemo here.
Website | Testnet | News | Algebra | Chat
#testnet#DEX#LP#TONCO#TONCO
💲Earn rewards on STON.fi
The Open League community incentives program is just getting started, with up to 1 million Toncoin (TON) ready to be distributed to TON Community this month. This is an opportunity you don't want to miss.
Follow these simple steps to participate:
1️⃣ Launch @ston_fi.
2️⃣ Connect your wallet.
3️⃣ Click the top right menu and select 'Pools' from the dropdown.
4️⃣ Select the pool you want to provide liquidity for.
5️⃣ Provide liquidity and farm LP tokens.
6️⃣ Review and confirm your transaction.
7️⃣ Keep an eye on your position as reward distributions are subject to rapid changes.
For a visual guide, watch the attached video
➡️ Start on @ston_fi now!
#guide#TVL#farming#LP
#Elezioni#Australia
Primo Ministro Scott #Morrison (#LP|ECR): "Come leader mi assumo la responsabilità delle vittorie e delle sconfitte. Questo è il peso e questa è la responsabilità della leadership. Di conseguenza, mi dimetterò dalla carica di leader alla prossima riunione di partito per garantire che possiamo andare avanti sotto una nuova leadership, che è la cosa appropriata da fare. Ho avuto il grande privilegio di guidare questo grande partito."
@UltimoraPolitics24
#Elezioni#Australia
Il Primo Ministro Scott #Morrison (#LP|ECR) ha chiamato il leader dell'#ALP|Centro-sinistra Anthony #Albanese e si è congratulato per la sua vittoria alle elezioni.
@UltimoraPolitics24
#Sondaggi#USA#Governative#Texas
Sondaggio di UTT:
Greg #Abbott (#R|ECR): 46% (+1)
Beto #ORourke (#D|Centro-sinistra): 39% (+1)
Delilah #Barrios (#GPUS|Verdi): 3% (+3)
Mark Jay #Tippetts (#LP|Libertari): 3% (+3)
Qualcun altro: 8% (-8)
Non lo so: 2% (+1)
Data rilevazione: 2-10 maggio
+/-: 8-15 febbraio
Intervistati: 1232
@UltimoraPolitics
#Cina#HongKong
L'ex segretario della sicurezza John #Lee è stato eletto come nuovo Capo Esecutivo di Hong Kong, che detiene il potere esecutivo della Regione amministrativa speciale.
John Lee era l'unico candidato alla carica. Di seguito i risultati:
Affluenza: 97,74%
Voti a favore di John #Lee (app. #DAB-#BPA-#FTU-#LP-#NPP-#HKFLU-#NCF-#PP)|Pro-Pechino: 99,44%
Voti contro John Lee: 0,56%
@UltimoraPolitics