-
Notifications
You must be signed in to change notification settings - Fork 7
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
4 changed files
with
37 additions
and
51 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 |
---|---|---|
|
@@ -7,34 +7,37 @@ on: | |
jobs: | ||
build: | ||
runs-on: ubuntu-latest | ||
|
||
env: | ||
GITHUB_USER: personiumio | ||
GITHUB_TOKEN: ${{ secrets.PERSONIUM_GITHUB_TOKEN }} | ||
COMPONENT: personium-lib-common | ||
|
||
steps: | ||
- uses: actions/checkout@v2 | ||
with: | ||
ref: master | ||
- name: git settings | ||
run: | | ||
if [ -z "$GITHUB_USER" -o -z "$GITHUB_TOKEN" ]; then | ||
echo '$GITHUB_USER or $GITHUB_TOKEN is empty.' | ||
exit 1 | ||
fi | ||
cat << EOS >~/.netrc | ||
machine github.com | ||
login $GITHUB_USER | ||
password $GITHUB_TOKEN | ||
EOS | ||
git config --global user.name "Personium Bot" | ||
git config --global user.email "[email protected]" | ||
git clone https://github.com/personium/${COMPONENT}.git . | ||
git checkout master | ||
- name: Remove -SNAPSHOT from pom.xml on master branch | ||
run: | | ||
bash ./.github/workflows/scripts/remove-SNAPSHOT.sh | ||
env: | ||
GITHUB_USER: personiumio | ||
GITHUB_TOKEN: ${{ secrets.PERSONIUM_GITHUB_TOKEN }} | ||
- name: Create Release Note | ||
run: | | ||
python3 ./.github/workflows/scripts/create-release-note.py | ||
env: | ||
GITHUB_USER: personiumio | ||
GITHUB_TOKEN: ${{ secrets.PERSONIUM_GITHUB_TOKEN }} | ||
COMPONENT: personium-lib-common | ||
|
||
- uses: actions/checkout@v2 | ||
with: | ||
ref: develop | ||
- name: Update versions on develop branch | ||
run: | | ||
bash ./.github/workflows/scripts/update-version.sh | ||
env: | ||
GITHUB_USER: personiumio | ||
GITHUB_TOKEN: ${{ secrets.PERSONIUM_GITHUB_TOKEN }} | ||
COMPONENT: personium-lib-common |
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 |
---|---|---|
|
@@ -5,29 +5,15 @@ echo 'Remove -SNAPSHOT started.' | |
# Delete -SNAPSHOT | ||
sed -i 's|\-SNAPSHOT||' pom.xml | ||
|
||
|
||
git branch | ||
git --version | ||
git diff | ||
git add . | ||
|
||
git config --global user.name "Personium Bot" | ||
git config --global user.email "[email protected]" | ||
|
||
# git commit and push | ||
VERSION=$( | ||
sed -n 's|^ <version>\([0-9]\+\.[0-9]\+\.[0-9]\+\)</version>|\1|p' pom.xml | ||
) | ||
echo ${VERSION} | ||
|
||
git diff | ||
git add . | ||
git commit -m "Update to v${VERSION}" | ||
|
||
cat << EOS >~/.netrc | ||
machine github.com | ||
login $GITHUB_USER | ||
password $GITHUB_TOKEN | ||
EOS | ||
|
||
git remote -v | ||
git push origin master | ||
|
||
echo 'Suceeded!' |
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 |
---|---|---|
|
@@ -2,10 +2,19 @@ | |
|
||
echo 'Update version started.' | ||
|
||
# Check git version | ||
git checkout master | ||
|
||
MINOR_VERSION=$( | ||
sed -n 's|^ <version>[0-9]\+\.[0-9]\+\.\([0-9]\+\)-SNAPSHOT</version>|\1|p' pom.xml | ||
sed -n 's|^ <version>[0-9]\+\.[0-9]\+\.\([0-9]\+\)</version>|\1|p' pom.xml | ||
) | ||
if [ -z "$MINOR_VERSION" ]; then | ||
echo 'Cannot get version.' | ||
exit 1 | ||
fi | ||
|
||
MINOR_VERSION=$((++MINOR_VERSION)) | ||
git checkout develop | ||
|
||
# update version in pom.xml | ||
sed -i \ | ||
|
@@ -20,28 +29,15 @@ if [ "${COMPONENT}" = "personium-core" -o "${COMPONENT}" = "personium-engine" ]; | |
fi | ||
|
||
# Git commit and push | ||
git branch | ||
git --version | ||
git diff | ||
git add . | ||
|
||
git config --global user.name "Personium Bot" | ||
git config --global user.email "[email protected]" | ||
|
||
VERSION=$( | ||
sed -n 's|^ <version>\([0-9]\+\.[0-9]\+\.[0-9]\+-SNAPSHOT\)</version>|\1|p' pom.xml | ||
) | ||
echo ${VERSION} | ||
|
||
git diff | ||
git add . | ||
git commit -m "Update to v${VERSION}" | ||
|
||
cat << EOS >~/.netrc | ||
machine github.com | ||
login $GITHUB_USER | ||
password $GITHUB_TOKEN | ||
EOS | ||
|
||
git remote -v | ||
git push origin develop | ||
|
||
echo 'Suceeded!' |
Submodule personium-lib-common
added at
697c51