This commit is contained in:
parent
758bcde8a7
commit
d5d211b866
@ -20,6 +20,14 @@
|
||||
getpkg install <tool_name>
|
||||
- legacy syntax for installing a tool (same as getpkg <tool_name>)
|
||||
|
||||
getpkg uninstall <tool_name>
|
||||
- uninstalls the specified tool
|
||||
- removes the tool from the user's system
|
||||
- removes the tool's entries in the ~/.bashrc_getpkg script
|
||||
- removes the tool's entry in the autocomplete function in the ~/.bashrc_getpkg script
|
||||
- removes the tool's entry in the ~/.config/getpkg/tool_name.json file
|
||||
- removes the tool's directory from ~/.local/bin/getpkg/
|
||||
|
||||
getpkg publish <tool_name:ARCH> <folder>
|
||||
- creates a tgz archive of the folder, and uploads it to getpkg.xyz, a simple object server.
|
||||
- prints the URL and hash of the uploaded archive
|
||||
|
@ -34,7 +34,12 @@ print_test_result() {
|
||||
}
|
||||
|
||||
# Function to cleanup test artifacts
|
||||
CLEANED=0
|
||||
cleanup() {
|
||||
if [ "$CLEANED" -eq 1 ]; then
|
||||
return
|
||||
fi
|
||||
CLEANED=1
|
||||
echo -e "\n${YELLOW}Cleaning up test artifacts...${NC}"
|
||||
|
||||
# Remove local test directories
|
||||
@ -43,9 +48,10 @@ cleanup() {
|
||||
rm -rf ~/.local/bin/getpkg/"${TEST_TOOL_NAME}" 2>/dev/null || true
|
||||
|
||||
# Remove test tool from bashrc_getpkg if it exists
|
||||
if [ -f ~/.bashrc_getpkg ]; then
|
||||
sed -i "/${TEST_TOOL_NAME}/d" ~/.bashrc_getpkg 2>/dev/null || true
|
||||
fi
|
||||
# if [ -f ~/.bashrc_getpkg ]; then
|
||||
# sed -i "/${TEST_TOOL_NAME}/d" ~/.bashrc_getpkg 2>/dev/null || true
|
||||
# fi
|
||||
$GETPKG uninstall "$TEST_TOOL_NAME" 2>/dev/null || true
|
||||
|
||||
# Clean up from getpkg.xyz if we have write access
|
||||
if [ -n "${SOS_WRITE_TOKEN:-}" ]; then
|
||||
@ -334,6 +340,8 @@ else
|
||||
echo -e "\n${YELLOW}Skipping update all test (no tools installed)${NC}"
|
||||
fi
|
||||
|
||||
cleanup
|
||||
|
||||
# Print summary
|
||||
echo -e "\n${YELLOW}Test Summary:${NC}"
|
||||
echo -e "Tests passed: ${GREEN}${TESTS_PASSED}${NC}"
|
||||
@ -345,4 +353,5 @@ if [ "$TESTS_FAILED" -eq 0 ]; then
|
||||
else
|
||||
echo -e "\n${RED}Some tests failed!${NC}"
|
||||
exit 1
|
||||
fi
|
||||
fi
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user