Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion .github/workflows/release-pr.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -123,7 +123,7 @@ jobs:
GITHUB_TOKEN: ${{ secrets.POLYWRAP_BUILD_BOT_PAT }}

- name: Apply Python Version & Commit
run: bash ./scripts/patchVersion.sh ${{env.RELEASE_VERSION}}
run: bash ./scripts/patchVersion.sh ${{env.RELEASE_VERSION}} __token__ ${{secrets.POLYWRAP_BUILD_BOT_PYPI_PAT}}

- name: Create Pull Request
id: cpr
Expand Down
29 changes: 29 additions & 0 deletions scripts/patchVersion.sh
Original file line number Diff line number Diff line change
Expand Up @@ -14,44 +14,73 @@ function patchVersion() {
done
fi
poetry lock
poetry install
cd $pwd
}

function publishPackage() {
local package=$1
local username=$2
local password=$3

local pwd=$(echo $PWD)

cd packages/$package
poetry publish --build --username $username --password $password
cd $pwd
}


# Patching Verion of polywrap-msgpack
echo "Patching Version of polywrap-msgpack to $1"
patchVersion polywrap-msgpack $1
echo "Publishing polywrap-msgpack"
publishPackage polywrap-msgpack $2 $3

# Patching Verion of polywrap-result
echo "Patching Version of polywrap-result to $1"
patchVersion polywrap-result $1
echo "Publishing polywrap-result"
publishPackage polywrap-result $2 $3

# Patching Verion of polywrap-manifest
echo "Patching Version of polywrap-manifest to $1"
deps=(polywrap-msgpack polywrap-result)
patchVersion polywrap-manifest $1 deps
echo "Publishing polywrap-manifest"
publishPackage polywrap-manifest $2 $3

# Patching Verion of polywrap-core
echo "Patching Version of polywrap-core to $1"
deps=(polywrap-result polywrap-manifest)
patchVersion polywrap-core $1 deps
echo "Publishing polywrap-core"
publishPackage polywrap-core $2 $3

# Patching Verion of polywrap-wasm
echo "Patching Version of polywrap-wasm to $1"
deps=(polywrap-msgpack polywrap-result polywrap-manifest polywrap-core)
patchVersion polywrap-wasm $1 deps
echo "Publishing polywrap-wasm"
publishPackage polywrap-wasm $2 $3

# Patching Verion of polywrap-plugin
echo "Patching Version of polywrap-plugin to $1"
deps=(polywrap-msgpack polywrap-result polywrap-manifest polywrap-core)
patchVersion polywrap-plugin $1 deps
echo "Publishing polywrap-plugin"
publishPackage polywrap-plugin $2 $3

# Patching Verion of polywrap-uri-resolvers
echo "Patching Version of polywrap-uri-resolvers to $1"
deps=(polywrap-result polywrap-wasm polywrap-core)
patchVersion polywrap-uri-resolvers $1 deps
echo "Publishing polywrap-uri-resolvers"
publishPackage polywrap-uri-resolvers $2 $3

# Patching Verion of polywrap-client
echo "Patching Version of polywrap-client to $1"
deps=(polywrap-result polywrap-msgpack polywrap-manifest polywrap-core polywrap-uri-resolvers)
patchVersion polywrap-client $1 deps
echo "Publishing polywrap-client"
publishPackage polywrap-client $2 $3