Skip to content
This repository has been archived by the owner on May 15, 2024. It is now read-only.

Commit

Permalink
Merge pull request #2 from SAP/versioning
Browse files Browse the repository at this point in the history
Remove false error message on failure to delete file
  • Loading branch information
kmoks committed Jan 23, 2024
2 parents 81efcfa + 3954784 commit d97eacb
Show file tree
Hide file tree
Showing 6 changed files with 32 additions and 17 deletions.
7 changes: 4 additions & 3 deletions CONTRIBUTING.md → .github/CONTRIBUTING.md
Original file line number Diff line number Diff line change
Expand Up @@ -12,13 +12,13 @@

All members of the project community must abide by the [SAP Open Source Code of Conduct](https://github.com/SAP/.github/blob/main/CODE_OF_CONDUCT.md).
Only by respecting each other we can develop a productive, collaborative community.
Instances of abusive, harassing, or otherwise unacceptable behavior may be reported by contacting [a project maintainer](.reuse/dep5).
Instances of abusive, harassing, or otherwise unacceptable behavior may be reported by contacting [a project maintainer](../.reuse/dep5).

## Engaging in Our Project

We use GitHub to manage reviews of pull requests.

* If you are a new contributor, see: [Steps to Contribute](#steps-to-contribute)
* If you are a new contributor, see [Steps to Contribute](#steps-to-contribute).

* Before implementing your change, create an issue that describes the problem you would like to solve or the code that should be enhanced. Please note that you are willing to work on that issue.

Expand All @@ -36,7 +36,8 @@ You are welcome to contribute code in order to fix a bug or to implement a new f

The following rule governs code contributions:

* Contributions must be licensed under the [Apache 2.0 License](./LICENSE)
* Contributions must be licensed under the [Apache 2.0 License](../LICENSE).

* Due to legal reasons, contributors will be asked to accept a Developer Certificate of Origin (DCO) when they create the first pull request to this project. This happens in an automated fashion during the submission process. SAP uses [the standard DCO text of the Linux Foundation](https://developercertificate.org/).

## Issues and Planning
Expand Down
10 changes: 7 additions & 3 deletions .github/workflows/versioning.yml
Original file line number Diff line number Diff line change
Expand Up @@ -13,11 +13,15 @@ on:

jobs:
bump-build-no:
if: github.event.commits[0].author.name != 'github-actions'
runs-on: ubuntu-latest

steps:
- name: Check out repository
- name: Check out source code repository
uses: actions/checkout@v3
with:
fetch-depth: 0
token: ${{ secrets.ACCESS_PAT }}

- name: Bump build number
run: echo "VERSION=$(awk -F. '{$NF++;print}' OFS=. < cfg/VERSION)" >> $GITHUB_ENV
Expand All @@ -27,7 +31,7 @@ jobs:

- name: Push updated VERSION file
run: |
git config user.name "${{ github.actor }}"
git config user.email "${{ github.actor }}@users.noreply.github.com"
git config user.name github-actions
git config user.email github-actions@github.com
git commit -m"chore(version): build number $VERSION" cfg/VERSION
git push origin HEAD
12 changes: 9 additions & 3 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -67,7 +67,9 @@ We use the packages [googletest](https://github.com/google/googletest) and
some unit tests for the C++ and Fortran code, respectively. Therefore,
you need to set the environment variables `GTEST_ROOT` and `PFUNIT` to point to
the root path of valid installations of the googletest and pFUnit frameworks,
respectively, before executing the cmake command shown below.
respectively, before executing the cmake command shown below. See
[Installing googletest and pFUnit](https://github.com/SAP/fedem-foundation/blob/main/pFUnit/README.md#installing-googletest-and-pfunit)
for instructions on how to install these packages on your system.

- From a bash shell or command prompt, clone the sources of this repository:

Expand All @@ -83,7 +85,7 @@ respectively, before executing the cmake command shown below.
cmake .. -DCMAKE_BUILD_TYPE=Release
make check

If you also want to build and test a shared object library for
If you also want to build and test the shared object library for
[chainShape](chainShape), you need to include `-DUSE_FORTRAN=ON`
as command-line option to the cmake command above.

Expand Down Expand Up @@ -143,7 +145,11 @@ See also the [README.md](test/fedempy/README.md) file for `fedempy`.

## Contributing

This project is open to feature requests/suggestions, bug reports etc. via [GitHub issues](https://github.com/SAP/fedem-mdb/issues). Contribution and feedback are encouraged and always welcome. For more information about how to contribute, the project structure, as well as additional contribution information, see our [Contribution Guidelines](CONTRIBUTING.md).
This project is open to feature requests, suggestions, bug reports, etc.,
via [GitHub issues](https://github.com/SAP/fedem-mdb/issues).
Contributions and feedback are encouraged and always welcome.
For more information about how to contribute,
see our [Contribution Guidelines](.github/CONTRIBUTING.md).

## Security / Disclosure

Expand Down
2 changes: 1 addition & 1 deletion cfg/VERSION
Original file line number Diff line number Diff line change
@@ -1 +1 @@
3.0.2
3.1.0
2 changes: 1 addition & 1 deletion fedem-foundation
Submodule fedem-foundation updated 88 files
+4 −3 .github/CONTRIBUTING.md
+7 −3 .github/workflows/versioning.yml
+4 −0 .reuse/dep5
+195 −0 LICENSES/NASA-1.3.txt
+5 −1 README.md
+1 −1 cfg/VERSION
+1 −1 cmake
+140 −0 pFUnit/README.md
+16 −0 pFUnit/pFUnit-3.3.3/.gitignore
+224 −0 pFUnit/pFUnit-3.3.3/CMakeLists.txt
+2 −0 pFUnit/pFUnit-3.3.3/COPYRIGHT
+131 −0 pFUnit/pFUnit-3.3.3/ChangeLog
+195 −0 pFUnit/pFUnit-3.3.3/LICENSE
+562 −0 pFUnit/pFUnit-3.3.3/README.md
+2 −0 pFUnit/pFUnit-3.3.3/VERSION
+2 −0 pFUnit/pFUnit-3.3.3/bin/CMakeLists.txt
+1,045 −0 pFUnit/pFUnit-3.3.3/bin/pFUnitParser.py
+99 −0 pFUnit/pFUnit-3.3.3/bin/parseDirectiveArgs.py
+165 −0 pFUnit/pFUnit-3.3.3/cmake/pFUnitConfig.cmake.in
+11 −0 pFUnit/pFUnit-3.3.3/cmake/pFUnitConfigVersion.cmake.in
+12 −0 pFUnit/pFUnit-3.3.3/cmake/packaging.cmake
+43 −0 pFUnit/pFUnit-3.3.3/include/PreprocessMacro.cmake
+23 −0 pFUnit/pFUnit-3.3.3/include/TestUtil.F90
+107 −0 pFUnit/pFUnit-3.3.3/include/cmake/Modules/FindOpenMP_Fortran.cmake
+343 −0 pFUnit/pFUnit-3.3.3/include/driver.F90
+ pFUnit/pFUnit-3.3.3/pFUnit3-ReferenceManual.pdf
+19 −0 pFUnit/pFUnit-3.3.3/source/.gitignore
+29 −0 pFUnit/pFUnit-3.3.3/source/AbstractTestParameter.F90
+86 −0 pFUnit/pFUnit-3.3.3/source/AbstractTestResult.F90
+54 −0 pFUnit/pFUnit-3.3.3/source/Assert.F90
+636 −0 pFUnit/pFUnit-3.3.3/source/AssertBasic.F90
+56 −0 pFUnit/pFUnit-3.3.3/source/BaseTestRunner.F90
+97 −0 pFUnit/pFUnit-3.3.3/source/CMakeLists.txt
+409 −0 pFUnit/pFUnit-3.3.3/source/CodeUtilities.py
+95 −0 pFUnit/pFUnit-3.3.3/source/DebugListener.F90
+77 −0 pFUnit/pFUnit-3.3.3/source/DynamicTestCase.F90
+506 −0 pFUnit/pFUnit-3.3.3/source/Exception.F90
+86 −0 pFUnit/pFUnit-3.3.3/source/Expectation.F90
+1,708 −0 pFUnit/pFUnit-3.3.3/source/GenerateAssertsOnArrays.py
+40 −0 pFUnit/pFUnit-3.3.3/source/GeneratedSources.py
+54 −0 pFUnit/pFUnit-3.3.3/source/Mock.F90
+60 −0 pFUnit/pFUnit-3.3.3/source/MockCall.F90
+288 −0 pFUnit/pFUnit-3.3.3/source/MockRepository.F90
+339 −0 pFUnit/pFUnit-3.3.3/source/MpiContext.F90
+114 −0 pFUnit/pFUnit-3.3.3/source/MpiStubs.F90
+143 −0 pFUnit/pFUnit-3.3.3/source/MpiTestCase.F90
+107 −0 pFUnit/pFUnit-3.3.3/source/MpiTestMethod.F90
+79 −0 pFUnit/pFUnit-3.3.3/source/MpiTestParameter.F90
+116 −0 pFUnit/pFUnit-3.3.3/source/ParallelContext.F90
+103 −0 pFUnit/pFUnit-3.3.3/source/ParallelException.F90
+58 −0 pFUnit/pFUnit-3.3.3/source/ParameterizedTestCase.F90
+47 −0 pFUnit/pFUnit-3.3.3/source/Params.F90
+216 −0 pFUnit/pFUnit-3.3.3/source/RemoteProxyTestCase.F90
+203 −0 pFUnit/pFUnit-3.3.3/source/ResultPrinter.F90
+322 −0 pFUnit/pFUnit-3.3.3/source/RobustRunner.F90
+108 −0 pFUnit/pFUnit-3.3.3/source/SerialContext.F90
+74 −0 pFUnit/pFUnit-3.3.3/source/SourceLocation.F90
+328 −0 pFUnit/pFUnit-3.3.3/source/StringConversionUtilities.F90
+182 −0 pFUnit/pFUnit-3.3.3/source/SubsetRunner.F90
+73 −0 pFUnit/pFUnit-3.3.3/source/SurrogateTestCase.F90
+67 −0 pFUnit/pFUnit-3.3.3/source/Test.F90
+200 −0 pFUnit/pFUnit-3.3.3/source/TestCase.F90
+46 −0 pFUnit/pFUnit-3.3.3/source/TestFailure.F90
+108 −0 pFUnit/pFUnit-3.3.3/source/TestListener.F90
+101 −0 pFUnit/pFUnit-3.3.3/source/TestMethod.F90
+342 −0 pFUnit/pFUnit-3.3.3/source/TestResult.F90
+144 −0 pFUnit/pFUnit-3.3.3/source/TestRunner.F90
+296 −0 pFUnit/pFUnit-3.3.3/source/TestSuite.F90
+228 −0 pFUnit/pFUnit-3.3.3/source/ThrowFundamentalTypes.F90
+97 −0 pFUnit/pFUnit-3.3.3/source/UnixPipeInterfaces.F90
+248 −0 pFUnit/pFUnit-3.3.3/source/UnixProcess.F90
+60 −0 pFUnit/pFUnit-3.3.3/source/Utilities.py
+306 −0 pFUnit/pFUnit-3.3.3/source/XmlPrinter.F90
+185 −0 pFUnit/pFUnit-3.3.3/source/pFUnit.F90
+127 −0 pFUnit/pFUnit-3.3.3/source/pFUnitPackage.F90
+37 −0 pFUnit/pFUnitExtra.f90.in
+51 −0 pFUnit/pFUnitExtraArg.f90
+1 −1 src/Admin/version.h
+1 −1 src/FFaLib/FFaCmdLineArg/FFaCmdLineArgImplementation.C
+6 −4 src/FFaLib/FFaDefinitions/FFaAppInfo.C
+1 −1 src/FFaLib/FFaOS/FFaDynamicLibraryBase.C
+2 −2 src/FFlLib/FFlIOAdaptors/FFlNastranReader.H
+16 −11 src/FFlLib/FFlIOAdaptors/FFlNastranResolver.C
+2 −2 src/FFlLib/FFlIOAdaptors/FFlSesamReader.C
+3 −3 src/FFlLib/FFlVisualization/FFlFaceGenerator.C
+5 −5 src/FFrLib/FFrExtractor.C
+1 −1 src/FFrLib/FFrTests/CMakeLists.txt
+1 −1 src/FFrLib/FFrVariableReference.C
16 changes: 10 additions & 6 deletions vpmDB/FmFileSys.C
Original file line number Diff line number Diff line change
Expand Up @@ -7,8 +7,8 @@

#include "vpmDB/FmFileSys.H"
#include "FFaLib/FFaOS/FFaFilePath.H"
#include "FFaLib/FFaDefinitions/FFaMsg.H"

#include <iostream>
#ifdef FT_HAS_QT
#include <QDateTime>
#include <QFileInfo>
Expand All @@ -19,7 +19,6 @@
#include <unistd.h>
#ifdef FT_HAS_DIRENT
#include <dirent.h>
#include <iostream>
#endif
#endif
#include <string.h>
Expand Down Expand Up @@ -407,11 +406,13 @@ int FmFileSys::removeDir(const std::string& dirName, bool removeFiles)
if (FmFileSys::isDirectory(FFaFilePath::makeItAbsolute(fName,dirName)))
ret = FmFileSys::removeDir(fName,removeFiles);
else if (removeFiles)
{
ret = FmFileSys::deleteFile(fName) ? 1 : -1;
if (ret < 0)
std::cerr <<" *** Could not delete file "<< fName << std::endl;
}
else
ret = -1;
if (ret < 0)
ListUI <<" -> Could not delete "<< fName <<"\n";
if (ret < 0 && ndel >= 0)
ndel = ret;
else if (ret < 0 || ndel >= 0)
Expand All @@ -420,9 +421,12 @@ int FmFileSys::removeDir(const std::string& dirName, bool removeFiles)
if (ndel < 0) return ndel;

#ifdef FT_HAS_QT
return dir.rmdir(".") ? ndel : -1;
ret = dir.rmdir(".") ? ndel : -1;
#else
ret = rmdir(dirName.c_str());
return ret < 0 ? ret : ndel;
if (ret == 0) ret = ndel;
#endif
if (ret < 0)
std::cerr <<" *** Could not delete directory "<< dirName << std::endl;
return ret;
}

0 comments on commit d97eacb

Please sign in to comment.