Skip to content

Commit

Permalink
fix(release-to-candidate): fix broken manifests when project_root i…
Browse files Browse the repository at this point in the history
…s used

In cases where project root is used, the workflow changes directory, and then writes the manifest.

In subsequent steps, a manifest is written without changing directory, meaning there is incomplete information, resulting in broken tables as seen in this issue: snapcrafters/ffmpeg-2404-sdk#12
  • Loading branch information
jnsgruk committed Apr 23, 2024
1 parent a7b7a24 commit a939416
Showing 1 changed file with 6 additions and 4 deletions.
10 changes: 6 additions & 4 deletions release-to-candidate/action.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -65,7 +65,6 @@ runs:
id: build
shell: bash
env:
SNAPCRAFT_REMOTE_BUILD_STRATEGY: "disable-fallback"
arch: ${{ inputs.architecture }}
name: ${{ steps.snapcraft-yaml.outputs.snap-name }}
yaml_path: ${{ steps.snapcraft-yaml.outputs.yaml-path }}
Expand All @@ -76,7 +75,8 @@ runs:
# https://bugs.launchpad.net/snapcraft/+bug/1885150
yq -i '.architectures |= [{"build-on": env(arch)}]' "$yaml_path"
cd "$project_root" && git init || exit
pushd "$project_root" && git init || exit
if ! snapcraft remote-build --launchpad-accept-public-upload; then
cat "${name}_${arch}.txt"
fi
Expand All @@ -88,13 +88,15 @@ runs:
exit 1
fi
popd || exit
# Write the manifest file which is used by later steps
echo "snap=${name}_${version}_${arch}.snap" >> "$GITHUB_OUTPUT"
if [[ -n "$project_root" ]]; then
echo "snap=${project_root}/${name}_${version}_${arch}.snap" >> "$GITHUB_OUTPUT"
fi
echo "name: ${name}" >> "manifest-${arch}.yaml"
echo "architecture: ${arch}" >> "manifest-${arch}.yaml"
echo "name: ${name}" >> "manifest-${{ inputs.architecture }}.yaml"
echo "architecture: ${arch}" >> "manifest-${{ inputs.architecture }}.yaml"
- name: Review the built snap
uses: diddlesnaps/snapcraft-review-action@v1
Expand Down

0 comments on commit a939416

Please sign in to comment.