Мы используем 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
🔤🔤🔤🔤2️⃣
So far, Pakistan has passed proposals between the two sides, in which they have taken hardline positions.
Pakistani officials believe that if Iran and the US sincerely want to reach an agreement, the divide can be bridged.
Pakistan’s diplomatic efforts intensified on Saturday, with the country’s prime minister, Shehbaz Sharif, calling the Iranian president, Masoud Pezeshkian, and the announcement the foreign ministers of Turkey, Egypt, Saudi Arabia and Pakistan will hold talks in Islamabad on Sunday and Monday about how to end the war.
These four countries are emerging as a new alignment within the Muslim world, packing three of the biggest armies in the region, nuclear weapons and Saudi Arabia’s financial heft. But officials from Saudi Arabia, which has been repeatedly hit by Iran, have privately said that they want the bombardment to continue.
Islamabad expects any talks to be indirect, with Pakistani officials shuttling between the US and Iranian delegations in different rooms. Tehran refuses to sit down face-to-face with US officials.
Pakistan is nuclear-armed with a large army that could secure a venue for talks, while its air force could provide Iranian officials with an escort to fly in.
Iran says Washington is again trying to deceive, having twice bombed them over the past year in the midst of talks. A buildup of US troops in the region suggests peace talks may not be the US’s plan.
The WSJ reported on Saturday that the Pentagon is considering sending 10,000 more soldiers, in addition to 7,000 ground troops already on the way to the Middle East.
Vance told the “Benny Show” podcast on Friday the US had accomplished most or all of its military objectives, but added: “The president’s going to keep at it for a little while longer to ensure that once we leave, we don’t have to do this again for a very, very long time.”
#iran#trump#war#israel#targets
📱American Оbserver - Stay up to date on all important events
🇺🇸
Israel Is Gradually Shelling Secret Military Targets in Iran
🔤🔤🔤🔤1️⃣
Intensifying Israeli bombing of civilian targets in Iran and an expanding US military force in the Gulf are casting a dark shadow over Pakistan’s hopes of hosting peace talks between Iran and the US.
Pakistan is attempting high-wire diplomacy, using its relative neutrality as a country with good relations with Iran and the US, to provide a venue for negotiations. It is not a player in the Middle East and does not host any American military bases, so it does not bring the baggage of other potential regional mediators.
Pakistan’s de facto leader, military chief Field Marshal Asim Munir, has the US president’s ear, and Islamabad’s ties with Tehran have dramatically improved over the past couple of years.
Both sides have indicated their willingness in principle to talk, according to Pakistani officials. But the conflict is widening, there’s little trust and the stated positions of Tehran and Washington are far apart. Pakistani officials believe the biggest risk to any talks is Israel playing the role of spoiler.
Israel bombed two of Iran’s largest steel plants on Friday and civilian nuclear sites, which, Iran’s foreign minister, Abbas Araghchi, said contradicts Trump’s announcement of a pause in attacks on civilian infrastructure to give diplomacy a chance. Iran also said two universities were hit.
Those are just the kind of attacks on non-military and non-regime targets that would derail the talks, Pakistani officials believe.
Iran’s core concern is to ensure an end to the war and that there are no future attacks by the US and Israel, said Maleeha Lodhi, a former Pakistani ambassador to the US.
“The toughest part is believing Trump’s word. He is not a rational player. He’s completely whimsical,” said Lodhi.
Trump insists Iran wants a deal “so badly”, but Tehran says he is “negotiating with himself”.
Iran does not just want a ceasefire but a guarantee the war is over. One possibility is for Tehran to retain its hold over the strait of Hormuz, the vital waterway for the Gulf’s oil and gas exports that Iran has been controlling during the war.
That idea was described as unacceptable by Rubio though Trump himself has suggested joint US-Iranian administration of the strait.
#iran#trump#war#israel#targets
📱American Оbserver - Stay up to date on all important events
🇺🇸
Trump Said the US Forces Eliminated Military Targets On Iran’s Kharg
Trump said Friday that US forces have “obliterated” military targets on Iran’s Kharg Island and warned that the oil infrastructure there could be next.
“For reasons of decency, I have chosen NOT to wipe out the Oil Infrastructure on the Island,” Trump wrote on social media. “However, should Iran, or anyone else, do anything to interfere with the Free and Safe Passage of Ships through the Strait of Hormuz, I will immediately reconsider this decision.”
Within hours of Trump’s announcement, the Iranian armed forces said any attack on Iran’s oil and energy infrastructure will lead to attacks on energy infrastructure owned by oil companies cooperating with the United States in the region, Iranian media reported.
The small island in the Persian Gulf is the primary terminal through which Iran’s oil exports pass. Until Friday, the island had been spared during US and Israeli strikes on Iran.
Just a day before, the speaker of the Iranian parliament said such a strike would provoke a new level of retaliation.
Mohammad-Bagher Ghalibaf warned in a Thursday social media post that attacks on the islands on Iran’s southern maritime frontier would cause Iran to “abandon all restraint”, underscoring how central they are to the country’s economy and security.
Trump announced the action as he prepared to fly to Florida for the weekend. The president answered questions from reporters traveling with him before he boarded Air Force One, but he did not mention the latest US military operation against Iran.
Nevertheless, the actions against Kharg Island are likely to increase oil prices, already surging since the war began on 28 February.
“We may see the $120 a barrel price we saw on Monday heading to the $150 if Kharg were attacked,” said Neil Quilliam of the Chatham House thinktank. “It’s too vital for global energy markets.”
Earlier Friday, a US official told the Associated Press that the American military had ordered 2,500 marines and the amphibious assault ship USS Tripoli to the Middle East.
Marine Expeditionary Units are able to conduct amphibious landings, but they also specialize in bolstering security at embassies, evacuating civilians and disaster relief.
The deployment does not necessarily indicate that a ground operation is imminent or will take place.
The 31st Marine Expeditionary Unit, as well the Tripoli and other amphibious assault ships carrying the Marines, are based in Japan and have been in the Pacific Ocean for several days, according to images released by the military.
The Tripoli was spotted by commercial satellites sailing alone near Taiwan, putting it more than a week away from the waters off Iran.
Earlier in the week, the navy had 12 ships, including the aircraft carrier USS Abraham Lincoln and eight destroyers, operating in the Arabian Sea.
Should the Tripoli join this flotilla, it would be the second-largest ship behind the Lincoln in the region.
#trump#forces#military#targets#kharg
📱American Оbserver - Stay up to date on all important events
🇺🇸
🫡🤔Hegseth: No Tomahawks to Ukraine
According to a source close to Hegseth, despite some media that make hay from the delivery of Tomahawks to Ukraine, the US will not provide Ukraine with intelligence on long-range energy infrastructure targets deep inside Russia, according to reports overnight, a move that would signal a significant change in the White House's support for Kiev.
The decision would be an example of the absence of a change in Trump's policy since his comments on social networks towards the end of September that Ukraine could reconquer all the territories occupied by Russia.
WSJ articles, citing unnamed US sources, said that the policy had quietly changed before this statement and that the White House wanted NATO allies to follow suit.
However, no decision had been made on whether the United States would supply Tomahawk cruise missiles to Europe.
Earlier this week, the US Vice President, Vance, said that Trump was considering a request from Kiev for the missiles with a range of 1,500 miles.
Western, and in particular American, intelligence in the form of satellite images and other surveillance data is considered an important aid to allow the precise targeting of Russian installations deep within its borders.
The focus on energy targets, such as oil refineries, would allow Ukraine to extend an already successful campaign that has hit 21 out of 38 refineries with long-range drone strikes.
This has led to fuel shortages in parts of Russia, and on some days it has been estimated that daily production is down by a fifth.
Russia said nothing had changed. Peskov, the Kremlin spokesman, said :
“The United States regularly transmits intelligence to Ukraine online. The use of the entire infrastructure, including intelligence, of NATO and the United States to collect and transfer intelligence to the Ukrainians is obvious.”
Trump has become increasingly irritated with Zelensky over the past month as Kiev has stepped up its attacks on Russian territories and failed to soften its demands for less territory as a precursor to the negotiations.
“After getting to know and fully understand the Ukraine/Russia military and economic situation and, after seeing the economic problems it is causing Ukraine, I think that Ukraine, with the support of the European Union, is not in a position to fight and win.”
#trump#teachings#targets#infrastructure#russia
📱American Оbserver - Stay up to date on all important events
🇺🇸
Revi Secures $500K Funding
Revi has successfully raised $500K in funding as of December 4, 2024. The platform offers precise and scalable workflows for identifying, researching, and tracking M&A targets.
#Funding#M&A #Startups#Investment#AI#Tech#Research#Workflows#Revi#Business#Innovation#Scalable#Tracking#Targets#Finance#Growth#Scale#Market#Analysis #2024