Skip to content

Commit

Permalink
change source to pecl
Browse files Browse the repository at this point in the history
  • Loading branch information
caothu159 committed May 3, 2024
1 parent b4b90df commit ce542a4
Show file tree
Hide file tree
Showing 4 changed files with 7 additions and 11 deletions.
1 change: 1 addition & 0 deletions ci/environment.sh
Original file line number Diff line number Diff line change
Expand Up @@ -37,6 +37,7 @@ env changelog $INPUT_SOURCE_DIR/debian/changelog
# plugin
env owner microsoft
env project msphpsql
env module sqlsrv

[[ -f /etc/os-release ]] && . /etc/os-release
[[ -f /etc/lsb-release ]] && . /etc/lsb-release
Expand Down
13 changes: 4 additions & 9 deletions ci/update_packages.sh
Original file line number Diff line number Diff line change
Expand Up @@ -5,19 +5,14 @@ set -e
# set -u
. $(dirname $(realpath "$BASH_SOURCE"))/head.sh

release_url=$(curl -Ls -o /dev/null -w %{url_effective} https://github.com/$owner/$project/releases/latest)
release_tag=$(basename $release_url)
release_dir=$INPUT_SOURCE_DIR/$project-$release_tag
pecl download $module
package_dist=$(ls | grep $module)
tar xvzf $package_dist -C $INPUT_SOURCE_DIR

rm -rf $release_dir
git clone -b $release_tag --depth=1 -- https://github.com/$owner/$project.git $release_dir

# cp $release_dir/package.xml $INPUT_SOURCE_DIR/package.xml
ls -la $release_dir
ls -la $INPUT_SOURCE_DIR

# Update module sqlsrv release latest
release_tag=$(echo $release_tag | sed 's|^[a-z]*||g')
release_tag=$(echo $package_dist | sed 's|.tgz||g' | cut -d '-' -f2)
old_release_tag=$(cat $changelog | head -n 1 | awk '{print $2}' | cut -d '+' -f1 | sed 's|[()]||g')
sed -i -e "0,/$old_release_tag/ s/$old_release_tag/$release_tag/g" $changelog

Expand Down
2 changes: 1 addition & 1 deletion src/debian/control
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ Uploaders: Tran Ngoc Duc <ductn@diepxuan.com>
Build-Depends: debhelper-compat (= 12),
debhelper (>= 10~),
dh-php (>= 4~),
php-all-dev
php-all-dev, tar
Section: php
Standards-Version: 2.0.1
Homepage: https://pecl.php.net/package/sqlsrv
Expand Down
2 changes: 1 addition & 1 deletion src/debian/control.in
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ Uploaders: Tran Ngoc Duc <ductn@diepxuan.com>
Build-Depends: debhelper-compat (= 12),
debhelper (>= 10~),
dh-php (>= 4~),
php-all-dev
php-all-dev, tar
Section: php
Standards-Version: 2.0.1
Homepage: https://pecl.php.net/package/sqlsrv
Expand Down

0 comments on commit ce542a4

Please sign in to comment.