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