mirror of
https://github.com/eledio-devices/thirdparty-littlefs.git
synced 2025-11-01 16:14:13 +01:00
Compare commits
1 Commits
license-no
...
simple-ver
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
0234c77102 |
67
.travis.yml
67
.travis.yml
@@ -134,53 +134,44 @@ jobs:
|
|||||||
- STAGE=deploy
|
- STAGE=deploy
|
||||||
- NAME=deploy
|
- NAME=deploy
|
||||||
script:
|
script:
|
||||||
# Update tag for version defined in lfs.h
|
# Find version defined in lfs.h
|
||||||
- LFS_VERSION=$(grep -ox '#define LFS_VERSION .*' lfs.h | cut -d ' ' -f3)
|
- LFS_VERSION=$(grep -ox '#define LFS_VERSION .*' lfs.h | cut -d ' ' -f3)
|
||||||
- LFS_VERSION_MAJOR=$((0xffff & ($LFS_VERSION >> 16)))
|
- LFS_VERSION_MAJOR=$((0xffff & ($LFS_VERSION >> 16)))
|
||||||
- LFS_VERSION_MINOR=$((0xffff & ($LFS_VERSION >> 0)))
|
- LFS_VERSION_MINOR=$((0xffff & ($LFS_VERSION >> 0)))
|
||||||
- LFS_VERSION="v$LFS_VERSION_MAJOR.$LFS_VERSION_MINOR"
|
# Grab latests patch from repo tags, default to 0
|
||||||
- echo "littlefs version $LFS_VERSION"
|
- LFS_VERSION_PATCH=$(curl -f -u "$GEKY_BOT_RELEASES"
|
||||||
|
https://api.github.com/repos/$TRAVIS_REPO_SLUG/git/refs
|
||||||
|
| jq 'map(.ref | match(
|
||||||
|
"refs/tags/v'"$LFS_VERSION_MAJOR"'\\.'"$LFS_VERSION_MINOR"'\\.(.*)$")
|
||||||
|
.captures[].string | tonumber + 1) | max // 0')
|
||||||
|
# We have our new version
|
||||||
|
- LFS_VERSION="v$LFS_VERSION_MAJOR.$LFS_VERSION_MINOR.$LFS_VERSION_PATCH"
|
||||||
|
- echo "VERSION $LFS_VERSION"
|
||||||
- |
|
- |
|
||||||
curl -u $GEKY_BOT_RELEASES -X POST \
|
# Check that we're the most recent commit
|
||||||
https://api.github.com/repos/$TRAVIS_REPO_SLUG/git/refs \
|
CURRENT_COMMIT=$(curl -f -u "$GEKY_BOT_RELEASES" \
|
||||||
-d "{
|
https://api.github.com/repos/$TRAVIS_REPO_SLUG/commits/master \
|
||||||
\"ref\": \"refs/tags/$LFS_VERSION\",
|
| jq -re '.sha')
|
||||||
\"sha\": \"$TRAVIS_COMMIT\"
|
if [ "$TRAVIS_COMMIT" == "$CURRENT_COMMIT" ]
|
||||||
}"
|
|
||||||
- |
|
|
||||||
curl -f -u $GEKY_BOT_RELEASES -X PATCH \
|
|
||||||
https://api.github.com/repos/$TRAVIS_REPO_SLUG/git/refs/tags/$LFS_VERSION \
|
|
||||||
-d "{
|
|
||||||
\"sha\": \"$TRAVIS_COMMIT\"
|
|
||||||
}"
|
|
||||||
# Create release notes from commits
|
|
||||||
- LFS_PREV_VERSION="v$LFS_VERSION_MAJOR.$(($LFS_VERSION_MINOR-1))"
|
|
||||||
- |
|
|
||||||
if [ $(git tag -l "$LFS_PREV_VERSION") ]
|
|
||||||
then
|
then
|
||||||
curl -u $GEKY_BOT_RELEASES -X POST \
|
# Build release notes
|
||||||
|
PREV=$(git tag --sort=-v:refname -l "v*.*.*" | head -1)
|
||||||
|
if [ ! -z "$PREV" ]
|
||||||
|
then
|
||||||
|
echo "PREV $PREV"
|
||||||
|
CHANGES=$'### Changes\n\n'$( \
|
||||||
|
git log --oneline $PREV.. --grep='^Merge' --invert-grep)
|
||||||
|
printf "CHANGES\n%s\n\n" "$CHANGES"
|
||||||
|
fi
|
||||||
|
# Create the release
|
||||||
|
curl -f -u "$GEKY_BOT_RELEASES" -X POST \
|
||||||
https://api.github.com/repos/$TRAVIS_REPO_SLUG/releases \
|
https://api.github.com/repos/$TRAVIS_REPO_SLUG/releases \
|
||||||
-d "{
|
-d "{
|
||||||
\"tag_name\": \"$LFS_VERSION\",
|
\"tag_name\": \"$LFS_VERSION\",
|
||||||
\"name\": \"$LFS_VERSION\"
|
\"target_commitish\": \"$TRAVIS_COMMIT\",
|
||||||
|
\"name\": \"${LFS_VERSION%.0}\",
|
||||||
|
\"body\": $(jq -sR '.' <<< "$CHANGES")
|
||||||
}"
|
}"
|
||||||
RELEASE=$(
|
|
||||||
curl -f -u $GEKY_BOT_RELEASES \
|
|
||||||
https://api.github.com/repos/$TRAVIS_REPO_SLUG/releases/tags/$LFS_VERSION
|
|
||||||
)
|
|
||||||
CHANGES=$(
|
|
||||||
git log --oneline $LFS_PREV_VERSION.. --grep='^Merge' --invert-grep
|
|
||||||
)
|
|
||||||
curl -f -u $GEKY_BOT_RELEASES -X PATCH \
|
|
||||||
https://api.github.com/repos/$TRAVIS_REPO_SLUG/releases/$(
|
|
||||||
jq -r '.id' <<< "$RELEASE"
|
|
||||||
) \
|
|
||||||
-d "$(
|
|
||||||
jq -s '{
|
|
||||||
"body": ((.[0] // "" | sub("(?<=\n)#+ Changes.*"; ""; "mi"))
|
|
||||||
+ "### Changes\n\n" + .[1])
|
|
||||||
}' <(jq '.body' <<< "$RELEASE") <(jq -sR '.' <<< "$CHANGES")
|
|
||||||
)"
|
|
||||||
fi
|
fi
|
||||||
|
|
||||||
# Manage statuses
|
# Manage statuses
|
||||||
|
|||||||
12
LICENSE.md
12
LICENSE.md
@@ -22,3 +22,15 @@ LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON
|
|||||||
ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
|
ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
|
||||||
(INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
|
(INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
|
||||||
SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
|
SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
|
||||||
|
|
||||||
|
---
|
||||||
|
|
||||||
|
*Note*:
|
||||||
|
Individual files contain the following tag instead of the full license text.
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
SPDX-License-Identifier: BSD-3-Clause
|
||||||
|
|
||||||
|
This enables machine processing of license information based on the SPDX
|
||||||
|
License Identifiers that are here available: http://spdx.org/licenses/
|
||||||
|
|||||||
13
README.md
13
README.md
@@ -146,19 +146,6 @@ The tests assume a Linux environment and can be started with make:
|
|||||||
make test
|
make test
|
||||||
```
|
```
|
||||||
|
|
||||||
## License
|
|
||||||
|
|
||||||
The littlefs is provided under the [BSD-3-Clause](https://spdx.org/licenses/BSD-3-Clause.html)
|
|
||||||
license. See [LICENSE.md](LICENSE.md) for more information. Contributions to
|
|
||||||
this project are accepted under the same license.
|
|
||||||
|
|
||||||
Individual files contain the following tag instead of the full license text.
|
|
||||||
|
|
||||||
SPDX-License-Identifier: BSD-3-Clause
|
|
||||||
|
|
||||||
This enables machine processing of license information based on the SPDX
|
|
||||||
License Identifiers that are here available: http://spdx.org/licenses/
|
|
||||||
|
|
||||||
## Related projects
|
## Related projects
|
||||||
|
|
||||||
[Mbed OS](https://github.com/ARMmbed/mbed-os/tree/master/features/filesystem/littlefs) -
|
[Mbed OS](https://github.com/ARMmbed/mbed-os/tree/master/features/filesystem/littlefs) -
|
||||||
|
|||||||
Reference in New Issue
Block a user