Skip to content

Commit

Permalink
fix: Fix tag parsing.
Browse files Browse the repository at this point in the history
  • Loading branch information
milesj committed Jan 24, 2024
1 parent 6289193 commit 137fde0
Show file tree
Hide file tree
Showing 3 changed files with 9 additions and 8 deletions.
4 changes: 4 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,3 +1,7 @@
# 0.3.1

- Fixed broken tag parsing.

# 0.3.0

- Updated to support monorepo based tags.
Expand Down
11 changes: 4 additions & 7 deletions index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -39,16 +39,13 @@ function detectVersionAndProject() {
TAG = tag;

// project-v1.0.0
if (project.includes('-')) {
const lastIndex = project.lastIndexOf('-');

project = project.slice(0, lastIndex);
version = project.slice(lastIndex + 1);
if (tag.includes('-')) {
[project, version] = tag.split('-', 2);
}

// [email protected]
else if (project.includes('@')) {
[project, version] = project.split('@');
else if (tag.includes('@')) {
[project, version] = tag.split('@', 2);
}

// v1.0.0
Expand Down
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "@moonrepo/build-wasm-plugin",
"version": "0.2.3",
"version": "0.3.1",
"description": "A GitHub action to build, optimize, and prepare WASM plugins for release.",
"main": "dist/index.js",
"scripts": {
Expand Down

0 comments on commit 137fde0

Please sign in to comment.