Skip to content

Commit

Permalink
package changelog
Browse files Browse the repository at this point in the history
  • Loading branch information
caothu159 committed May 5, 2024
1 parent 9466f18 commit 32d0c89
Show file tree
Hide file tree
Showing 4 changed files with 22 additions and 4 deletions.
7 changes: 7 additions & 0 deletions .github/workflows/main.yml
Original file line number Diff line number Diff line change
Expand Up @@ -75,10 +75,17 @@ jobs:
- name: Installing build dependencies
if: true
run: bash ci/depends.sh
env:
INPUT_EXTRA_BUILD_DEPS:

- name: Updating build information
if: true
run: bash ci/package_update.sh
env:
DEBEMAIL: ductn@diepxuan.com
EMAIL: ductn@diepxuan.com
DEBFULLNAME: Tran Ngoc Duc
NAME: Tran Ngoc Duc

- name: Building package binary
if: true
Expand Down
2 changes: 1 addition & 1 deletion ci/depends.sh
Original file line number Diff line number Diff line change
Expand Up @@ -39,5 +39,5 @@ sudo apt build-dep $INPUT_APT_OPTS -- "$source_dir"
# build-dep` will *always* install build-essential which depends on dpkg-dev.
# But let’s be explicit here.
# shellcheck disable=SC2086
sudo apt install $INPUT_APT_OPTS -- dpkg-dev libdpkg-perl dput $INPUT_EXTRA_BUILD_DEPS
sudo apt install $INPUT_APT_OPTS -- dpkg-dev libdpkg-perl dput devscripts $INPUT_EXTRA_BUILD_DEPS
end_group
14 changes: 13 additions & 1 deletion ci/package_update.sh
Original file line number Diff line number Diff line change
Expand Up @@ -5,12 +5,14 @@ set -e
# set -u
. $(dirname $(realpath "$BASH_SOURCE"))/head.sh

start_group "extract package source"
stability=$(pecl search $module 2>/dev/null | grep ^$module | awk '{print $3}' | sed 's|[()]||g')
pecl download $module-$stability
# pecl download runkit7-alpha
package_dist=$(ls | grep $module)
tar xvzf $package_dist -C $source_dir
package_clog=$(php -r "echo simplexml_load_file('$source_dir/package.xml')->notes;" 2>/dev/null)
end_group

start_group "view source"
ls -la ./
Expand All @@ -37,6 +39,7 @@ EOF
end_group

start_group "update package config"
cd $source_dir
release_tag=$(echo $package_dist | sed 's|.tgz||g' | cut -d '-' -f2)
release_tag="$release_tag+$DISTRIB~$RELEASE"
old_project=$(cat $changelog | head -n 1 | awk '{print $1}' | sed 's|[()]||g')
Expand All @@ -47,23 +50,32 @@ sed -i -e "s|$old_project|$_project|g" $changelog
sed -i -e "s|$old_release_tag|$release_tag|g" $changelog
sed -i -e "s|$old_codename_os|$CODENAME|g" $changelog
sed -i -e "s|<$email> .*|<$email> $timelog|g" $changelog
dch -a $package_clog -m
cd -
end_group

start_group "update package config for $module"
[[ -f $ci_dir/package_update/$module.sh ]] && . $ci_dir/package_update/$module.sh
end_group

start_group "update package changelog"
[[ -f $ci_dir/package_update/$module.sh ]] && . $ci_dir/package_update/$module.sh
end_group

rm -rf "$control-e"
rm -rf "$controlin-e"
rm -rf "$changelog-e"

start_group log
cat $control
cat $controlin
cat $changelog
cat $rules
end_group

start_group changelog
cat $changelog
end_group

start_group "log package changelog"
echo $package_clog
end_group
3 changes: 1 addition & 2 deletions src/debian/changelog
Original file line number Diff line number Diff line change
@@ -1,5 +1,4 @@
php-runkit7 (4.0.0a6) jammy; urgency=medium
php-runkit7 (4.0.0a6) UNRELEASED; urgency=medium

* Enables ability to modify/rename/remove internal functions.

-- Tran Ngoc Duc <ductn@diepxuan.com> Sat, 04 May 2024 22:00:51 +0700

0 comments on commit 32d0c89

Please sign in to comment.