Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

SVN to GIT #5

Open
wants to merge 54 commits into
base: main
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from 53 commits
Commits
Show all changes
54 commits
Select commit Hold shift + click to select a range
804dd57
remove svn dependencies: change variables, different tool for changel…
matyaskopp May 27, 2024
aa60ed6
remove endline from version #3
matyaskopp May 27, 2024
486180a
update git ignore and add empty directories #3
matyaskopp May 28, 2024
490a9bb
fix paths in package patches #3
matyaskopp May 28, 2024
d37101b
remove temporary archive, fix version comment #3
matyaskopp May 28, 2024
4ea449e
remove svn dependency from dep package build #3
matyaskopp May 28, 2024
27441e9
remove svn dependency from rpm #3
matyaskopp May 29, 2024
1ee67d4
unix_install is not a part of repository - removing "svn update"(/"gi…
matyaskopp May 29, 2024
674667d
update main documentation file (#3)
matyaskopp May 29, 2024
93ddd87
changelog script clean up #3
matyaskopp May 29, 2024
1e9d524
remove repository url from update_version #3
matyaskopp May 29, 2024
6abbe40
change SVN_VERSION placeholder to DEV_VERSION #3
matyaskopp May 29, 2024
a4514b7
use git as a source for unix_install folder #3
matyaskopp May 29, 2024
dd621bc
fix version in documentation patching #3
matyaskopp May 29, 2024
9496fa2
fix comments, remove svn2cl #3
matyaskopp May 29, 2024
6ba44e0
change setting for mac #3
matyaskopp Jun 12, 2024
30cded4
fix gitignore #3
matyaskopp Jun 14, 2024
2f3bfe8
force using -std=c89 when compiling Tk::JPEG on macOS #8
matyaskopp Jun 14, 2024
4620b87
add Tk::JPEG patch to configuration #8
matyaskopp Jun 14, 2024
ff103fc
extend gitignore
matyaskopp Sep 30, 2024
8fddd1c
use perlbrew in mac releaser (the default perlbrew perl !!!)
matyaskopp Sep 30, 2024
d09986d
add missing prerequisity for Test-Simple-1.302204
matyaskopp Sep 30, 2024
aa238f3
add missing prerequisity for Tk-CodeText-0.53
matyaskopp Sep 30, 2024
f9fb6f4
add missing prerequisity for Tk-CodeText-0.53
matyaskopp Sep 30, 2024
2102913
add missing prerequisity for Syntax-Kamelon-0.25
matyaskopp Sep 30, 2024
02256c4
add missing prerequisity for XML-TokeParser-0.05
matyaskopp Sep 30, 2024
8aa7057
add missing prerequisity for Syntax-Kamelon-0.25 and XML-Parser-2.47
matyaskopp Sep 30, 2024
dcc5c56
add missing prerequisity for Template-Toolkit-3.102,XML-Parser-2.47,T…
matyaskopp Sep 30, 2024
4659f4b
add missing prerequisity for Tk-ColorEntry-0.08
matyaskopp Sep 30, 2024
a3fb8b8
add missing prerequisity for Convert-Color-0.18
matyaskopp Sep 30, 2024
bc41af8
add missing prerequisity for XML-LibXML-2.0210
matyaskopp Sep 30, 2024
4ba7cbd
add missing prerequisity for Alien-Build-2.83
matyaskopp Sep 30, 2024
b72aad7
add missing prerequisity for XML-LibXML-2.0210
matyaskopp Sep 30, 2024
5bdba74
add missing prerequisity for Alien-Libxml2-0.19
matyaskopp Sep 30, 2024
79df812
add missing prerequisity for Alien-Build-Plugin-Download-GitLab-0.01
matyaskopp Oct 1, 2024
afdd3f4
add missing prerequisity for URI-5.29
matyaskopp Oct 1, 2024
69217a3
add missing prerequisity for Graph-0.9732
matyaskopp Oct 1, 2024
42e89c0
add missing prerequisity for Test-Fatal-0.017
matyaskopp Oct 1, 2024
c124607
add missing prerequisity for HTTP-Message-6.46
matyaskopp Oct 1, 2024
3e8736a
add missing prerequisity for Clone-0.47
matyaskopp Oct 1, 2024
ca163de
update LWP::UserAgent version
matyaskopp Oct 1, 2024
47ecc1e
prerequisities reorder
matyaskopp Oct 2, 2024
396db70
prerequisities reorder
matyaskopp Oct 2, 2024
ef5a4c1
prerequisities reorder
matyaskopp Oct 2, 2024
9c267e8
add missing prerequisity for libwww-perl-6.77 and Alien-Build-2.83
matyaskopp Oct 2, 2024
493ace2
prerequisities reorder
matyaskopp Oct 2, 2024
ff83555
prerequisities reorder
matyaskopp Oct 2, 2024
961b979
prerequisities reorder
matyaskopp Oct 2, 2024
28491c4
add missing prerequisity for Alien-Build-2.83
matyaskopp Oct 2, 2024
4493e6c
add missing prerequisity for HTML-Parser-3.83
matyaskopp Oct 2, 2024
2d6ea52
add info prints
matyaskopp Oct 18, 2024
9581aa8
Merge branch 'svn2git' of github.com:ufal/TrEd into svn2git
Oct 18, 2024
74e21c5
use old TK-CodeText version (newer has Imager-Screenshot dependency, …
matyaskopp Nov 8, 2024
cba5c9f
fix c-header path on MacOS
matyaskopp Nov 8, 2024
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
17 changes: 17 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,17 @@
/dist
dpan/dpan/authors/id/D/DP/DPAN/*.tar.gz
dpan/dpan/authors/id/D/DP/DPAN/*.tar.gz.patched
!dpan/dpan/authors/id/D/DP/DPAN/.gitkeep
extensions
/local_install
/local_www
/Treex-PML
/unix_install
/virtualenv
win32_strawberry/perl/*
!win32_strawberry/perl/.gitkeep
/win32_strawberry/*.exe
/unix_install_pkgs/deb/tred_3*
/unix_install_pkgs/rpm/tred-3*
/dpan/dpan/indexing_log
/admin/7zExtra
9 changes: 8 additions & 1 deletion Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -133,7 +133,7 @@ make-changelog:
# - TrEd version number (based on SVN revision)
# - compile the documentation from DocBook and POD (tred/devel/make_manual)
# - updated extensions dir (SVN working copy)
update-dist-dir: make-changelog
update-dist-dir: make-changelog extensions
cd admin && ./update-dist-dir.sh


Expand Down Expand Up @@ -184,3 +184,10 @@ compile-treex-pml-dist:
install-treex-pml:
cd admin && ./install-treex-pml.sh



#### Extensions repository
extensions:
GIT_DIR=`pwd` && \
. admin/env.sh && \
git clone $${TRED_GIT_EXT} $${TRED_EXT_DIR}
2 changes: 1 addition & 1 deletion admin/create_installer_with_strawberry_perl.sh
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ function get_strawberry() {
}

if [ -z "$VER" ]; then
VER=`$DIST_DIR/tred/devel/update_version.pl -n ${TRED_SVN_REPO}`
VER=`$DIST_DIR/tred/devel/update_version.pl -n`
fi


Expand Down
4 changes: 2 additions & 2 deletions admin/create_tred_packages.sh
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@ WWW="$3"
SFX=$(dirname $0)/7zExtra/7zS.sfx

if [ -z "$VER" ]; then
VER=`$DIST_DIR/tred/devel/update_version.pl -n ${TRED_SVN_REPO}`
VER=`$DIST_DIR/tred/devel/update_version.pl -n`
fi

cd "$DIST_DIR"
Expand All @@ -33,7 +33,7 @@ PKG="tred-current.tar.gz"
DATE="$(LANG=C date)"

# update revision numbers in tred source tree
perl -pi -e 's/our \$VERSION = "SVN_VERSION"/our \$VERSION = "'$VER'"/g' tred/tredlib/TrEd/Version.pm
perl -pi -e 's/our \$VERSION = "DEV_VERSION"/our \$VERSION = "'$VER'"/g' tred/tredlib/TrEd/Version.pm
# update revision numbers in index.html
perl -pi~ -e "s/tred-(?:current|[0-9.]+?)\\.tar\\.gz/${PKG}/g; s/Current version:.*</Current version: ${VER} (release date ${DATE})</g" ${WWW}/index.html

Expand Down
33 changes: 20 additions & 13 deletions admin/env_refactored.sh
Original file line number Diff line number Diff line change
@@ -1,19 +1,19 @@
#!/bin/bash

# Root dir of the SVN checkout. All dirs are derived from this one
if [ -z "$SVN_DIR" ]; then
SVN_DIR=$(dirname $(dirname $(dirname $(readlink -fen $0))))
# Root dir of the GIT checkout. All dirs are derived from this one
if [ -z "$GIT_DIR" ]; then
GIT_DIR=$(dirname $(dirname $(readlink -fen $0)))
fi


# Installation prefix -- documentation goes to $INSTALL_BASE/doc,
# binaries go to $INSTALL_BASE/exec,
# libraries go to $INSTALL_BASE/lib,
# extensions to $INSTALL_BASE/share
INSTALL_BASE=${SVN_DIR}/local_install
INSTALL_BASE=${GIT_DIR}/local_install

# Local (source) web tree
WWW=${SVN_DIR}/local_www
WWW=${GIT_DIR}/local_www
export TREDWWW=$WWW

# Remote web tree (of the testbed)
Expand All @@ -24,12 +24,13 @@ REMOTE_WWW=${TESTING_SERVER}:/var/www/tred/testbed
# The selected user should log there without password (by certificate)
LOGIN_NAME=tred

PYTHON_ENV=${GIT_DIR}/virtualenv

# TrEd project direcotry (from which Makefile is executed)
PROJECT_DIR=${SVN_DIR}/trunk
PROJECT_DIR=${GIT_DIR}

# Log for svn checkouts and exports during make
LOG=$SVN_DIR/trunk/make_log
# Log for git checkouts and exports during make
LOG=$GIT_DIR/make_log

TRED_HOME_URL="http://ufallab.ms.mff.cuni.cz:24080/tred/testbed"
TRED_EXTENSIONS_URL=""
Expand Down Expand Up @@ -62,12 +63,18 @@ INSTALL_DOC=${INSTALL_BASE}/doc
RSS=${WWW}/tred/changelog.rss

# Basic paths
TRED_SVN=https://svn.ms.mff.cuni.cz/svn/TrEd
TRED_SVN=SVN:ERROR--https://svn.ms.mff.cuni.cz/svn/TrEd
TRED_SVN_REPO=${TRED_SVN}/trunk/tred_refactored
TRED_SVN_EXT=${TRED_SVN}/extensions
TREEX_PML_REPO=https://svn.ms.mff.cuni.cz/svn/perl_libs/trunk/distribution/Treex-PML
WIN32_DIST_REPO=https://svn.ms.mff.cuni.cz/svn/perl_libs/trunk/distribution/win32_build_script

TRED_FOLDER=tred_refactored
TRED_GIT_REPO=${GIT_DIR}/${TRED_FOLDER}
[email protected]:ufal/TrEd-extensions.git
# https://github.com/ufal/TrEd-extensions.git


# PROJECT_DIR=/net/work/projects/tred
ADMIN_DIR=${PROJECT_DIR}/admin
DIST_DIR=${PROJECT_DIR}/dist
Expand All @@ -89,8 +96,8 @@ TREEX_PML_EXPORT=${PROJECT_DIR}/generated/Treex-PML
# mutli-script to run jobs on the SGE cluster
LRC_CMD=${ADMIN_DIR}/run_on_lrc

# SVN to ChangeLog conversion
SVN_TO_CHANGELOG=${ADMIN_DIR}/svn2cl/svn2cl.sh
# GIT to ChangeLog conversion
GIT_TO_CHANGELOG=${PYTHON_ENV}/bin/git-changelog
# ChangeLog to RSS conversion
CHANGELOG_TO_RSS=${ADMIN_DIR}/changelog2rss.pl

Expand All @@ -101,7 +108,7 @@ CHANGELOG_TO_RSS=${ADMIN_DIR}/changelog2rss.pl


## MAC OS settings
MAC_RELEASER=[email protected]
MAC_RELEASER=mMcBair.local
MAC_TRED_INSTALLATION='~/tred_installation'
MAC_TRED_INSTALLATION_OLD='~/tred_installation_old'
MAC_SVN_DIR='~/TrEd'
MAC_GIT_DIR='~/work/TrEd'
2 changes: 1 addition & 1 deletion admin/mac_backup_previous.sh
Original file line number Diff line number Diff line change
Expand Up @@ -3,5 +3,5 @@
. env.sh
ssh $MAC_RELEASER <<EOF
rm -rf $MAC_TRED_INSTALLATION_OLD;
mv $MAC_TRED_INSTALLATION $MAC_TRED_INSTALLATION_OLD;
mv $MAC_TRED_INSTALLATION $MAC_TRED_INSTALLATION_OLD || echo "no previous release to backup";
EOF
4 changes: 2 additions & 2 deletions admin/mac_download_release.sh
Original file line number Diff line number Diff line change
Expand Up @@ -2,12 +2,12 @@

. env.sh

SVN_VERSION=`svn info . | grep 'Revision:' | sed -E 's/[^0-9]+//g'`
GIT_DATE=`git log -1 --date=format:"%Y%m%d" --format="%ad"|tr -d "\n"`

echo "Copying tred.dmg to local www"
scp $MAC_RELEASER:$MAC_TRED_INSTALLATION/tred.dmg "${TREDWWW}/tred/"

# keep history of released versions in subdir releases/osx
mkdir -p "${TREDWWW}/tred/releases/osx" 2>/dev/null
DMG_FILE="tred_2.${SVN_VERSION}.dmg"
DMG_FILE="tred_3.${GIT_DATE}.dmg"
cp "${TREDWWW}/tred/tred.dmg" "${TREDWWW}/tred/releases/osx/$DMG_FILE"
4 changes: 2 additions & 2 deletions admin/mac_prepare.sh
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,6 @@ scp ${WWW}/tred/tred-current.tar.gz $MAC_RELEASER:$MAC_TRED_INSTALLATION
scp ${WWW}/tred/tred-dep-unix.tar.gz $MAC_RELEASER:$MAC_TRED_INSTALLATION
ssh $MAC_RELEASER <<EOF
chmod +x $MAC_TRED_INSTALLATION/install_tred.bash
cd TrEd && svn update || echo "Unable to update repository. Do it manually if needed!!!\nContinues without repository updated.\n"
cd ~/TrEd/trunk/osx_install/bin && ./unpack.sh && mv release-template.dmg ../scripts
cd ${MAC_GIT_DIR} && git pull || echo "Unable to update repository. Do it manually if needed!!!\nContinues without repository updated.\n"
cd ${MAC_GIT_DIR}/osx_install/bin && ./unpack.sh && mv release-template.dmg ../scripts
EOF
10 changes: 5 additions & 5 deletions admin/mac_release.sh
Original file line number Diff line number Diff line change
Expand Up @@ -5,9 +5,9 @@ SIGNATURE=$1
. env.sh

ssh $MAC_RELEASER <<EOF
# . ~/.bash_profile
# echo "======== perl version"
# perlbrew info
# echo "========"
cd $MAC_SVN_DIR/trunk/osx_install/scripts && ./make-release.sh $SIGNATURE
. ~/perl5/perlbrew/etc/bashrc
echo "======== perl version"
perlbrew info
echo "========"
cd ${MAC_GIT_DIR}/osx_install/scripts && ./make-release.sh $SIGNATURE
EOF
30 changes: 6 additions & 24 deletions admin/make-changelog.sh
Original file line number Diff line number Diff line change
@@ -1,32 +1,14 @@
#!/bin/bash
# Create changelog from svn log
# Create changelog from git log

EXTDIR=`dirname $(readlink -fen $0)`
. "$EXTDIR"/env.sh
. ${PYTHON_ENV}/bin/activate

echo "Generating changelog" && \
echo "Updating svn..." && \
svn update ${TRED_SRC_DIR} >> $LOG && \
echo "Updating git..." && \
git pull >> $LOG && \
echo "done" && \

# find the current revision number of svn
# LAST_COMMIT_NO=`svn info ${TRED_SRC_DIR} | grep "Revision:" | cut -d ':' -f 2 | cut -d ' ' -f 2` && \
#
# if [ -a ${TRED_SRC_DIR}/ChangeLog ]; then
# # if ChangeLog exists, we should update it only if it does not already contain the last revision
# LAST_COMMIT_IN_CHANGELOG=`grep -c "r$LAST_COMMIT_NO" ${TRED_SRC_DIR}/ChangeLog`
# else
# # if ChangeLog does not exist, it needs to be created
# LAST_COMMIT_IN_CHANGELOG=0
# fi && \

## echo "LAST_COMMIT_NO = $LAST_COMMIT_NO"
## echo "LAST_COMMIT_IN_CHANGELOG = $LAST_COMMIT_IN_CHANGELOG"

# if [ "$LAST_COMMIT_IN_CHANGELOG" == 0 ]; then
echo "Transforming svn log --> ChangeLog (this takes a while)..." && \
cd ${TRED_SRC_DIR} && ${SVN_TO_CHANGELOG} --include-rev -o ChangeLog && \
# else
# echo "ChangeLog is already up to date."
# fi && \
echo "Transforming git log --> ChangeLog (this takes a while)..." && \
cd ${TRED_SRC_DIR} && ${GIT_TO_CHANGELOG} > ChangeLog && \
echo "Done"
6 changes: 3 additions & 3 deletions admin/prepare-tred-web-release.sh
Original file line number Diff line number Diff line change
Expand Up @@ -22,9 +22,9 @@ cp -f ${TRED_DIST_DIR}/documentation/refactoring/TrEd_refactoring.pdf ${WWW}/tre
##change urls in index.html to point to the directory of that index, should be changed when there is another place for TrEd
xsh2 -P ${WWW}/tred/index.html 'nobackups; rm //*[@class="offline"]; map :i { s{^TRED_HOME_URL/}{} } //@href;' && \

# Fix SVN version in links and text...
SVN_VERSION=`svn info . | grep 'Revision:' | sed -E 's/[^0-9]+//g'`
sed -i "s/(SVN:VERSION)/$SVN_VERSION/g" ${WWW}/tred/index.html
# Fix git date version in links and text...
GIT_DATE=`git log -1 --date=format:"%Y%m%d" --format="%ad"|tr -d "\n"`
sed -i "s/(GIT:DATE)/$GIT_DATE/g" ${WWW}/tred/index.html

##ATT if we want ActivePerl ppm packages
# we need to run win32_ppm/get_packages_tred_58 a get_packages_tred_510.sh before this is run
Expand Down
63 changes: 16 additions & 47 deletions admin/prereq.sh
Original file line number Diff line number Diff line change
Expand Up @@ -27,37 +27,6 @@ function perl_module_presence_and_version_test {
fi
}

# This funcition downloads current version of svn2cl script from web,
# compares its MD5 sum to the MD5 sum found on the web and
# unpacks it, if the MD5 sum is correct
function get_svn2cl {
### svn2cl
SVN2CL_URL="https://arthurdejong.org/svn2cl/"
SVN2CL_FILE_DL="svn2cl.tar.gz"
wget ${SVN2CL_URL}downloads.html -O web >> $LOG

NEWEST_SVN2CL=`grep -o "svn2cl-[0-9.]\+tar.gz" web | head -n 1`
wget -nv ${SVN2CL_URL}${NEWEST_SVN2CL} -O $SVN2CL_FILE_DL >> $LOG
wget -nv ${SVN2CL_URL}${NEWEST_SVN2CL}.md5 -O ${SVN2CL_FILE_DL}.md5 >> $LOG

SVN2CL_MD5_WEB=`cut -d ' ' -f 1 $SVN2CL_FILE_DL.md5`
SVN2CL_MD5_LOCAL=`md5sum $SVN2CL_FILE_DL | cut -d ' ' -f 1`

if [ "$SVN2CL_MD5_WEB" == "$SVN2CL_MD5_LOCAL" ]; then
echo "MD5 sum ok, extracting svn2cl.."
tar xvzf $SVN2CL_FILE_DL -C $ADMIN_DIR
# remove the version of the svn2cl from dir name
mv ${ADMIN_DIR}/svn2cl*/ ${ADMIN_DIR}/svn2cl
echo "done"
else
echo "MD5 sum error, please download and unpack svn2cl to dir $ADMIN_DIR/svn2cl manually..."
exit 1;
fi
rm $SVN2CL_FILE_DL
rm -f web
rm -f ${SVN2CL_FILE_DL}.md5
}

# This function downloads 7zip and unpacks it, if the MD5 sum of the downloaded
# package is correct
function get_7zExtra {
Expand Down Expand Up @@ -124,10 +93,16 @@ else
fi


if [ -x "$SVN_TO_CHANGELOG" ]; then
echo "svn2cl found, OK."
if [ ! -x "$PYTHON_ENV/bin/activate" ]; then
python -m venv ${PYTHON_ENV}
fi
. ${PYTHON_ENV}/bin/activate


if [ -x "$GIT_TO_CHANGELOG" ]; then
echo "git-changelog found, OK."
else
get_svn2cl
pip install git-changelog
fi

BIN_7Z=`which 7z`
Expand Down Expand Up @@ -209,16 +184,10 @@ else
echo "Done"
fi

## create or update unix_install directory
if [ -d "$TRED_UNIXINST_DIR" ]; then
cd $TRED_UNIXINST_DIR
echo "Updating unix_install checkout directory"
svn up >> $LOG
echo "Done"
else
echo "No directory unix_install found, creating a new one and making a fresh checkout"
mkdir $TRED_UNIXINST_DIR 2>/dev/null
svn co $TRED_SVN_REPO/devel/unix_install $TRED_UNIXINST_DIR >> $LOG
echo "Done"
fi

## create unix_install directory
echo "remove and create unix_install checkout directory"
rm -rf "$TRED_UNIXINST_DIR"
git -C ${TRED_SRC_DIR}/devel/unix_install archive --output $TRED_UNIXINST_DIR.zip HEAD >> $LOG
unzip ${TRED_UNIXINST_DIR}.zip -d ${TRED_UNIXINST_DIR} >> $LOG && \
rm ${TRED_UNIXINST_DIR}.zip && \
echo "Done"
6 changes: 3 additions & 3 deletions admin/release-deb.sh
Original file line number Diff line number Diff line change
Expand Up @@ -6,15 +6,15 @@
EXTDIR=`dirname $(readlink -fen $0)`
. $EXTDIR/env.sh

SVN_VERSION=`svn info . | grep 'Revision:' | sed -E 's/[^0-9]+//g'`
GIT_DATE=`git log -1 --date=format:"%Y%m%d" --format="%ad"|tr -d "\n"`

# Prepare the deb package
cd "$PROJECT_DIR/unix_install_pkgs/deb" || exit 1
./prepare_deb_pkg.sh || exit 2

# Copying the package to the local www
echo "Copying the package to local www ..."
DEB_FILE="tred_2.${SVN_VERSION}_all.deb"
DEB_FILE="tred_3.${GIT_DATE}_all.deb"
cp "./${DEB_FILE}" "${TREDWWW}/tred/${DEB_FILE}"
d=`pwd`
cd "${TREDWWW}/tred/"
Expand All @@ -29,7 +29,7 @@ ssh ${LOGIN_NAME}@${TESTING_SERVER} "rm -f /var/www/tred/testbed/*.deb"

# Upload the package to the testbed website
echo "Uploading the package to testbed web ..."
DEB_FILE="tred_2.${SVN_VERSION}_all.deb"
DEB_FILE="tred_3.${GIT_DATE}_all.deb"
scp "./${DEB_FILE}" "${LOGIN_NAME}@${REMOTE_WWW}/${DEB_FILE}"

# Make sure tred.deb link points to the newest deb package
Expand Down
6 changes: 3 additions & 3 deletions admin/release-rpm.sh
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@
EXTDIR=`dirname $(readlink -fen $0)`
. $EXTDIR/env.sh

SVN_VERSION=`svn info . | grep 'Revision:' | sed -E 's/[^0-9]+//g'`
GIT_DATE=`git log -1 --date=format:"%Y%m%d" --format="%ad"|tr -d "\n"`

# Prepare the deb package
cd "$PROJECT_DIR/unix_install_pkgs/rpm" || exit 1
Expand All @@ -24,7 +24,7 @@ for DISTRO in $DISTROS; do
echo "... for $DISTRO ..."
d=`pwd`
cd "${TREDWWW}/tred/"
ln -sfr "tred-2-${SVN_VERSION}-${DISTRO}.noarch.rpm" "tred-${DISTRO}.rpm"
ln -sfr "tred-3-${GIT_DATE}-${DISTRO}.noarch.rpm" "tred-${DISTRO}.rpm"
cd $d
done

Expand All @@ -46,7 +46,7 @@ echo "Creating symlinks for rpm packages ..."
DISTROS=`ls -1 ./tred*.rpm | sed -E 's/^.*tred-[0-9]+-[0-9]+-//' | sed 's/[.]noarch[.]rpm$//' | tr "\\n" " "`
for DISTRO in $DISTROS; do
echo "... for $DISTRO ..."
ssh ${LOGIN_NAME}@${TESTING_SERVER} "cd /var/www/tred/testbed && ln -sf ./tred-2-${SVN_VERSION}-${DISTRO}.noarch.rpm ./tred-${DISTRO}.rpm"
ssh ${LOGIN_NAME}@${TESTING_SERVER} "cd /var/www/tred/testbed && ln -sf ./tred-3-${GIT_DATE}-${DISTRO}.noarch.rpm ./tred-${DISTRO}.rpm"
done

cd "$EXTDIR"
Loading