-
-
Notifications
You must be signed in to change notification settings - Fork 111
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
fix(linux): fix problem with API checks with merge commits
This change fixes a problem if both `master` and a branch added the same symbol with different version numbers. This causes a merge conflict which previously caused the API checks to output an error. However, if the version number in the .symbols file got updated since the base then it's no error which this change implements.
- Loading branch information
1 parent
13caa2e
commit e5c1f81
Showing
5 changed files
with
295 additions
and
92 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,89 @@ | ||
#!/usr/bin/env bash | ||
|
||
setup() { | ||
OLDPATH=${PATH} | ||
tmpDir="$(mktemp -d)" | ||
mockDebPkgTools | ||
} | ||
|
||
teardown() { | ||
PATH=${OLDPATH} | ||
rm -rf "${tmpDir}" | ||
} | ||
|
||
mockDebPkgTools() { | ||
echo "#!/bin/bash | ||
" > "${tmpDir}/dpkg" | ||
chmod +x "${tmpDir}/dpkg" | ||
cp "${tmpDir}/dpkg" "${tmpDir}/dpkg-gensymbols" | ||
PATH=${tmpDir}:${PATH} | ||
} | ||
|
||
createBase() { | ||
TIER=$1 | ||
remoteDir=$(mktemp -d) | ||
cd "${remoteDir}" | ||
git init --bare --initial-branch=master . | ||
|
||
workDir=$(mktemp -d) | ||
cd "${workDir}" | ||
git init --initial-branch=master . | ||
git remote add origin "${remoteDir}" | ||
mkdir -p linux/debian | ||
echo "libkeymancore.so.1 libkeymancore1 #MINVER# | ||
* Build-Depends-Package: libkeymancore-dev | ||
km_core_actions_dispose@Base 17.0.197 | ||
km_core_context_clear@Base 17.0.195 | ||
km_core_context_get@Base 17.0.198 | ||
km_core_context_item_list_size@Base 17.0.195 | ||
km_core_context_items_dispose@Base 17.0.195 | ||
" > linux/debian/libkeymancore1.symbols | ||
git add linux/debian/libkeymancore1.symbols | ||
|
||
mkdir -p core | ||
echo "1.0.0" > core/CORE_API_VERSION.md | ||
git add core/CORE_API_VERSION.md | ||
|
||
echo "16.0.145" > VERSION.md | ||
git add VERSION.md | ||
|
||
echo "stable" > TIER.md | ||
git add TIER.md | ||
|
||
mkdir -p linux/scripts | ||
cp -r "${REPO_ROOT}"/linux/scripts/* linux/scripts | ||
git add linux/scripts | ||
|
||
mkdir -p resources/build | ||
cp -r "${REPO_ROOT}"/resources/build/* resources/build | ||
cp "${REPO_ROOT}"/resources/builder.inc.sh resources/ | ||
git add resources | ||
|
||
git commit -m "Initial" | ||
git push origin master | ||
|
||
git branch -c stable-16.0 | ||
git push origin stable-16.0 | ||
git tag -m "16.0.145" release-16.0.145 | ||
git push origin release-16.0.145 | ||
|
||
echo "${TIER}" > TIER.md | ||
git add TIER.md | ||
|
||
echo "17.0.255" > VERSION.md | ||
git add VERSION.md | ||
git commit -m "Commit for Alpha" | ||
git push origin master | ||
|
||
git checkout -b chore | ||
|
||
BINPKG_NAME=${tmpDir}/libkeymancore1_17.0.257-1+noble1_amd64.deb | ||
touch "${BINPKG_NAME}" | ||
} | ||
|
||
run_test() { | ||
setup | ||
$1 > "/tmp/$1.log" 2>&1 && echo -e "${COLOR_GREEN}$1: OK${COLOR_RESET}" || echo -e "${COLOR_RED}$1: FAILED${COLOR_RESET}" | ||
teardown | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,5 @@ | ||
#!/usr/bin/env bash | ||
set -eu | ||
|
||
"$(dirname "$0")/deb-packaging.tests.sh" | ||
"$(dirname "$0")/verify_api.tests.sh" |
Oops, something went wrong.