Skip to content
Snippets Groups Projects
Commit 18f61837 authored by alexandr.kravchenko's avatar alexandr.kravchenko
Browse files

Checking out the postfix version modification (How will changelogs work now?)

parent 6b57bf38
No related branches found
No related tags found
1 merge request!72Checking out the postfix version modification (How will changelogs work now?)
#!/bin/bash #!/bin/bash
repack() {
DEBNAME=$1
echo "Renaming control on $DEBNAME"
mkdir tmp && cd tmp
ar p ../$DEBNAME control.tar.gz | tar -xz
VERSION=$(cat control | grep Version | cut -d ':' -f2)
echo "Version is $VERSION"
sed -i "s/$VERSION/${VERSION}-$DISTR_CODENAME/" control
tar czf control.tar.gz *[!z]
ar r ../$DEBNAME control.tar.gz
cd ..
rm -rf tmp
}
echo "Deploying to $PACKAGE_PATH" echo "Deploying to $PACKAGE_PATH"
echo $wd echo $wd
...@@ -12,10 +28,16 @@ NOTONBUILDSERVER=0 ...@@ -12,10 +28,16 @@ NOTONBUILDSERVER=0
gitlab-runner -v 2&>> /dev/null || NOTONBUILDSERVER=$? gitlab-runner -v 2&>> /dev/null || NOTONBUILDSERVER=$?
if [[ $NOTONBUILDSERVER == 0 ]]; then if [[ $NOTONBUILDSERVER == 0 ]]; then
mkdir -p $REPO_DIR_SRC mkdir -p $REPO_DIR_SRC
cd $REPO_DIR_SRC
for pkgfile in $PKGFILES; do for pkgfile in $PKGFILES; do
cp -v $wd/$PACKAGE_PATH/$pkgfile $REPO_DIR_SRC cp -v $wd/$PACKAGE_PATH/$pkgfile $REPO_DIR_SRC
for variant in $HOST_DISTR_VERSIONS; do
ls $pkgfile | grep $variant && DISTR_CODENAME=$variant #Since we add a postfix into every debpackage done, we'll extract it that way.
done
repack $pkgfile
done done
cd $REPO_DIR cd $REPO_DIR
echo "Attempting to add packages into $DISTR_VARIANT section to $DISTR_CODENAME"
sudo reprepro -C "$DISTR_COMPONENT" --ask-passphrase includedeb "$DISTR_CODENAME" $REPO_DIR_SRC/*.deb sudo reprepro -C "$DISTR_COMPONENT" --ask-passphrase includedeb "$DISTR_CODENAME" $REPO_DIR_SRC/*.deb
#Update into reprepro: #Update into reprepro:
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment