Skip to content

Commit

Permalink
Merge branch 'main' of github.com:efabless/EF_UART
Browse files Browse the repository at this point in the history
  • Loading branch information
NouranAbdelaziz committed Jan 12, 2025
2 parents 07e4f9c + 8d8c36c commit 0aa4834
Showing 1 changed file with 13 additions and 8 deletions.
21 changes: 13 additions & 8 deletions ipm_package.bash
Original file line number Diff line number Diff line change
@@ -1,11 +1,11 @@
#!/bin/bash
# to run use bash ipm_package.bash --version x.x.x
# to run use bash ipm_package.bash --version x.x.x --ip_name name
# More safety, by turning some bugs into errors.
set -o errexit -o pipefail -o nounset

# now enjoy the options in order and nicely split until we see --
# option --output/-o requires 1 argument
LONGOPTS=version:
LONGOPTS=version:ip_name:
OPTIONS=

# -temporarily store output to be able to check for errors
Expand All @@ -24,6 +24,11 @@ while true; do
version="$2"
shift 2
;;
--)
--ip_name)
ip_name="$2"
shift 2
;;
--)
shift
break
Expand Down Expand Up @@ -57,14 +62,14 @@ sed -i "s/version.*/version: v$version/" *.yaml
sed -i "s/date.*/date: $(date +"%Y-%m-%d")/" *.yaml

# create tag
git tag -a EF_UART-v$version -m "Release version $version"
git push origin EF_UART-v$version
git tag -a $ip_name-v$version -m "Release version $version"
git push origin $ip_name-v$version

# create release
set -x
if gh release view EF_UART-v$version > /dev/null 2>&1; then
echo "Release EF_UART-v$version already exists. Skipping..."
if gh release view $ip_name-v$version > /dev/null 2>&1; then
echo "Release $ip_name-v$version already exists. Skipping..."
else
echo "Creating release EF_UART-v$version..."
gh release create EF_UART-v$version v$version.tar.gz -t "EF_UART-v$version" --notes "sha256: $(cat v$version.tar.gz.sha256)"
echo "Creating release $ip_name-v$version..."
gh release create $ip_name-v$version v$version.tar.gz -t "$ip_name-v$version" --notes "sha256: $(cat v$version.tar.gz.sha256)"
fi

0 comments on commit 0aa4834

Please sign in to comment.