Skip to content

Commit

Permalink
fix: Fixed the composer lock file and release process
Browse files Browse the repository at this point in the history
  • Loading branch information
seebeen committed Aug 11, 2023
1 parent d00d004 commit f6e2a1a
Show file tree
Hide file tree
Showing 4 changed files with 25 additions and 5 deletions.
8 changes: 8 additions & 0 deletions .github/scripts/release.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
#!/bin/bash

NEXT_VERSION=$1
CURRENT_VERSION=$(cat composer.json | grep version | head -1 | awk -F= "{ print $2 }" | sed 's/[version:,\",]//g' | tr -d '[[:space:]]')

sed -i "s/\"version\": \"$CURRENT_VERSION\"/\"version\": \"$NEXT_VERSION\"/g" composer.json

zip -r "/tmp/release.zip" composer.json README.md CHANGELOG.md src
18 changes: 15 additions & 3 deletions .releaserc
Original file line number Diff line number Diff line change
Expand Up @@ -15,18 +15,30 @@
[
"@semantic-release/exec",
{
"prepareCmd": "sed -i 's/0.0.0/${nextRelease.version}/g' composer.json"
"prepareCmd": "sh ./.github/scripts/release.sh ${nextRelease.version}"
}
],
[
"@semantic-release/git",
{
"assets": [
"CHANGELOG.md"
"CHANGELOG.md",
"composer.json"
],
"message": "chore(release): ${nextRelease.version} [skip ci]\n\n${nextRelease.notes}"
}
],
"@semantic-release/github"
[
"@semantic-release/github",
{
"assets": [
{
"path": "/tmp/release.zip",
"name": "transliterator-${nextRelease.version}",
"label": "Transliterator v${nextRelease.version}"
}
]
}
]
]
}
2 changes: 1 addition & 1 deletion composer.json
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
{
"name": "oblak/transliterator",
"description": "This Module Transliterates Cyrillic to Latin script",
"version": "0.0.0",
"version": "2.0.0",
"authors": [
{
"name": "Sibin Grasic",
Expand Down
2 changes: 1 addition & 1 deletion composer.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

0 comments on commit f6e2a1a

Please sign in to comment.