-
Notifications
You must be signed in to change notification settings - Fork 306
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Browse files
Browse the repository at this point in the history
Add a VERSION file for all things that want to display a version to be able to read from. Add an scons target "release" that takes a RELEASE variable to create a new release from. This updates: - the VERSION file - the RPM daos.spec and then commits the changes. Get the version of the libdaos library to import from the VERSION file. Once a PR with an updated VERSION file lands to master, a GitHub action will create a release on GitHub which will include creating a tag on master where the PR was landed. Signed-off-by: Brian J. Murrell <brian.murrell@intel.com>
- Loading branch information
1 parent
4442217
commit 055a30f
Showing
9 changed files
with
268 additions
and
5 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,7 @@ | ||
FROM alpine:3.10 | ||
|
||
COPY entrypoint.sh /entrypoint.sh | ||
|
||
RUN apk add --no-cache git curl | ||
|
||
ENTRYPOINT ["/entrypoint.sh"] |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,6 @@ | ||
name: 'Make Release' | ||
description: 'Make a release when requested' | ||
author: 'Brian J. Murrell' | ||
runs: | ||
using: 'docker' | ||
image: 'Dockerfile' |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,42 @@ | ||
#!/bin/sh -l | ||
|
||
# Only need to do any of this if the version has been updated | ||
# NOTE: The diff-index with HEAD^ implies that the VERSION | ||
# must be updated in the last commit. But version update | ||
# PRs really should just be a single commit since we | ||
# script the creation of the version update PR. | ||
if ! git diff-index --name-only HEAD^ | grep -q VERSION; then | ||
echo "VERSION not updated, exiting" | ||
exit 0 | ||
fi | ||
|
||
# Don't create a release for the first time the VERSION file is | ||
# added as that point is most surely not an actual release. | ||
if git diff-tree --diff-filter=A --no-commit-id --name-status -r HEAD | | ||
grep -q VERSION; then | ||
echo "VERSION being added not updated, exiting" | ||
exit 0 | ||
fi | ||
|
||
release=$(cat VERSION) | ||
|
||
# Ensure that the GITHUB_TOKEN secret is included | ||
if [ -z "$GITHUB_TOKEN" ]; then | ||
echo "Set the GITHUB_TOKEN env variable." | ||
exit 1 | ||
fi | ||
|
||
json="{ | ||
\"tag_name\": \"v$release\", | ||
\"target_commitish\": \"$GITHUB_SHA\", | ||
\"name\": \"Release $release\", | ||
\"body\": \"DAOS release $release\", | ||
\"draft\": false, | ||
\"prerelease\": false | ||
}" | ||
|
||
curl --request POST \ | ||
--url https://api.github.com/repos/"${GITHUB_REPOSITORY}"/releases \ | ||
--header "Authorization: Bearer $GITHUB_TOKEN" \ | ||
--header 'Content-Type: application/json' \ | ||
--data "$json" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,17 @@ | ||
name: Create Release | ||
# This workflow is triggered on pushes to the master branch of the repository. | ||
on: | ||
push: | ||
branches: | ||
- master | ||
|
||
jobs: | ||
make_release: | ||
name: Create Release | ||
runs-on: ubuntu-latest | ||
steps: | ||
- uses: actions/checkout@v1 | ||
- uses: ./.github/actions/make_release | ||
id: make_release | ||
env: | ||
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
0.6.0 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters