forked from gatsby-uc/gatsby-plugin-s3
-
Notifications
You must be signed in to change notification settings - Fork 1
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #3 from pixelfusion/feat/ci-release
fix: implement github actions automated deployment on merge
- Loading branch information
Showing
3 changed files
with
34 additions
and
2 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
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,23 @@ | ||
#!/bin/bash | ||
|
||
# Check if a version parameter is provided | ||
if [ $# -eq 0 ]; then | ||
echo "Error: Version parameter is missing." | ||
exit 1 | ||
fi | ||
|
||
# Store the version parameter | ||
version=$1 | ||
|
||
# Update package.json with the provided version | ||
jq --arg version "$version" '.version = $version' gatsby-plugin-s3/package.json > gatsby-plugin-s3/package-temp.json | ||
mv gatsby-plugin-s3/package-temp.json gatsby-plugin-s3/package.json | ||
|
||
# Commit the package.json changes | ||
git add gatsby-plugin-s3/package.json | ||
git commit -m "chore: update package.json version to $version" | ||
|
||
# Push the changes to origin | ||
git push origin | ||
|
||
echo "Package version updated successfully to $version and changes pushed to origin." |