H
H
HeroFromEarth2017-08-29 15:30:58
Data storage
HeroFromEarth, 2017-08-29 15:30:58

How to organize a repository with the latest software versions?

Hello.
There is a task of the following nature: the company periodically releases motley software (let's call it that): scripts, packages, just binaries, and so on. I would like to be able to get the latest version of the software from a single place, like this: where packagename-latest is a link to the latest version of packagename . Naturally, I would not want to edit the link after each release, it should change automatically. How best to organize all these Wishlist? Maybe there is free software that solves this problem?
wget "http://ip_address/packagename-latest"

Answer the question

In order to leave comments, you need to log in

2 answer(s)
H
HeroFromEarth, 2017-09-27
@HeroFromEarth

Dimitri, thanks for the reply!
As a result, in order to save time, I made the simplest option that suited me: I installed proftpd and added a script task to crontab that runs every minute:

PACKAGES=$(find /ftp/* -type d -not -name 'lost+found')
for PACKAGE in ${PACKAGES[@]}; do
  echo $(ls -I 'latest' -Atp $PACKAGE | grep -v '/' | head -n 1) > $PACKAGE/latest
done

As a result, if the user just needs the latest version of the software, then he goes to ftp and takes it. For automation purposes:
# Через curl получаем название файла, являющегося последним добавленным в директории, и скачиваем его через wget
wget ftp://${FTP_SRV}/${PKG_NAME}/$(curl -s ftp://${FTP_SRV}/${PKG_NAME}/latest)

The solution is far from perfect, but it worked for me :)

D
Dmitry, 2017-08-29
@plin2s

Nexus

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question