Skip to content

Commit

Permalink
Merge pull request #93 from essentialkaos/develop
Browse files Browse the repository at this point in the history
Version 2.9.0
  • Loading branch information
andyone authored Aug 17, 2021
2 parents 2425123 + f6df087 commit a41a0d4
Show file tree
Hide file tree
Showing 5 changed files with 42 additions and 24 deletions.
19 changes: 0 additions & 19 deletions SOURCES/libexec/sources-scm.shx
Original file line number Diff line number Diff line change
Expand Up @@ -675,22 +675,3 @@ packSourcesFromSvn() {

show "Source files from ${CL_BOLD}svn${CL_NORM} repo packed as ${CL_CYAN}${source_name}.${source_ext}${CL_NORM} ${CL_DARK}(${source_size})${CL_NORM}"
}

# Remove SCM data from directory with data
#
# 1: Path to dir with sources (String)
#
# Code: No
# Echo: No
cleanPackDir() {
local dir="$1"

find "$dir" -type d -name ".git" -exec rm -rf {} \; 2> /dev/null
find "$dir" -type d -name ".hg" -exec rm -rf {} \; 2> /dev/null
find "$dir" -type d -name ".svn" -exec rm -rf {} \; 2> /dev/null
find "$dir" -type d -name ".bzr" -exec rm -rf {} \; 2> /dev/null

find "$dir" -type f -name ".gitignore" -exec rm -f {} \; 2> /dev/null
find "$dir" -type f -name ".hgignore" -exec rm -f {} \; 2> /dev/null
find "$dir" -type f -name ".bzrignore" -exec rm -f {} \; 2> /dev/null
}
35 changes: 35 additions & 0 deletions SOURCES/libexec/sources.shx
Original file line number Diff line number Diff line change
Expand Up @@ -267,3 +267,38 @@ generateChecksumFile() {

return $status
}

# Remove useless files and directories from directory with data
#
# 1: Path to directory with sources (String)
#
# Code: No
# Echo: No
cleanPackDir() {
local dir="$1"

find "$dir" -type d -name ".git" -exec rm -rf {} \; 2> /dev/null
find "$dir" -type d -name ".hg" -exec rm -rf {} \; 2> /dev/null
find "$dir" -type d -name ".svn" -exec rm -rf {} \; 2> /dev/null
find "$dir" -type d -name ".bzr" -exec rm -rf {} \; 2> /dev/null

find "$dir" -type f -name ".gitignore" -exec rm -f {} \; 2> /dev/null
find "$dir" -type f -name ".hgignore" -exec rm -f {} \; 2> /dev/null
find "$dir" -type f -name ".bzrignore" -exec rm -f {} \; 2> /dev/null
find "$dir" -type f -name ".gitmodules" -exec rm -f {} \; 2>/dev/null

# Remove CI service configuration files
find "$dir" -type f -name ".github" -exec rm -rf {} \; 2>/dev/null
find "$dir" -type f -name ".travis.yml" -exec rm -f {} \; 2>/dev/null
find "$dir" -type f -name ".drone.sec" -exec rm -f {} \; 2>/dev/null
find "$dir" -type f -name ".drone.yml" -exec rm -f {} \; 2>/dev/null
find "$dir" -type f -name ".hound.yml" -exec rm -f {} \; 2>/dev/null
find "$dir" -type f -name ".vexor.yml" -exec rm -f {} \; 2>/dev/null
find "$dir" -type f -name ".codebeatsettings" -exec rm -f {} \; 2>/dev/null

# Remove test data
find "$dir" -type d -name "testdata" -exec rm -rf {} \; 2>/dev/null

# Remove empty directories
find "$dir" -type d -empty -delete 2>/dev/null
}
2 changes: 1 addition & 1 deletion SOURCES/rpmbuilder
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ fi
APP="RPMBuilder"

# Utility version (String)
VER="2.8.1"
VER="2.9.0"

################################################################################

Expand Down
1 change: 0 additions & 1 deletion rpmbuilder.source
Original file line number Diff line number Diff line change
Expand Up @@ -2,4 +2,3 @@ SOURCES/rpmbuilder
SOURCES/rpmunbuilder
SOURCES/libexec/
LICENSE
SOURCES/LICENSE
9 changes: 6 additions & 3 deletions rpmbuilder.spec
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@

Summary: RPM package build helper
Name: rpmbuilder
Version: 2.8.0
Version: 2.9.0
Release: 0%{?dist}
License: Apache License, Version 2.0
Group: Development/Tools
Expand All @@ -15,7 +15,7 @@ BuildRoot: %{_tmppath}/%{name}-%{version}-%{release}-root-%(%{__id_u} -n)

Requires: rpm >= 4.8.0 rpm-build rpmdevtools yum-utils
Requires: sshpass coreutils tmux
Requires: perfecto >= 2.0 rpmlint
Requires: perfecto >= 3.0 rpmlint

Provides: %{name} = %{version}-%{release}

Expand Down Expand Up @@ -47,14 +47,17 @@ rm -rf %{buildroot}

%files
%defattr(-,root,root,-)
%doc LICENSE LICENSE.RU
%doc LICENSE
%{_libexecdir}/%{name}
%{_bindir}/%{name}
%{_bindir}/rpmunbuilder

################################################################################

%changelog
* Tue Aug 17 2021 Anton Novojilov <andy@essentialkaos.com> - 2.9.0-0
- Improved sources cleanup process

* Thu May 14 2020 Anton Novojilov <andy@essentialkaos.com> - 2.8.0-0
- Speeded up fetching data from git repositories
- Show info about packaged sources size
Expand Down

0 comments on commit a41a0d4

Please sign in to comment.