diff --git a/.github/workflows/add-issues-to-pipeling-issue-tracker.yaml b/.github/workflows/add-issues-to-pipeling-issue-tracker.yaml new file mode 100644 index 00000000..594defea --- /dev/null +++ b/.github/workflows/add-issues-to-pipeling-issue-tracker.yaml @@ -0,0 +1,13 @@ +name: Assign Issue to Project + +on: + issues: + types: [opened] + +jobs: + add-to-project: + uses: turbot/steampipe-workflows/.github/workflows/assign-issue-to-pipeling-issue-tracker.yml@main + with: + issue_number: ${{ github.event.issue.number }} + repository: ${{ github.repository }} + secrets: inherit \ No newline at end of file diff --git a/.github/workflows/publish.yml b/.github/workflows/publish.yml index dbfcb7cf..209dd7ea 100644 --- a/.github/workflows/publish.yml +++ b/.github/workflows/publish.yml @@ -22,11 +22,11 @@ jobs: - name: Get Release assets env: GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} - run: |- + run: |- gh release download ${{ github.event.inputs.release }} --dir . --repo ${{ github.repository }} - name: Release assets downloaded - run: |- + run: |- ls -la . - name: Sanitize Version @@ -91,6 +91,7 @@ jobs: - name: Push to registry run: |- REF="$CORE_REPO/$IMAGE_NAME:$VERSION" + LATEST_REF="$CORE_REPO/$IMAGE_NAME:latest" oras push $REF \ --config config.json:application/vnd.turbot.steampipe.config.v1+json \ --annotation-file annotations.json \ @@ -100,3 +101,11 @@ jobs: steampipe_postgres_fdw.so.linux_arm64.gz:application/vnd.turbot.steampipe.fdw.linux-arm64.layer.v1+gzip \ steampipe_postgres_fdw.control:application/vnd.turbot.steampipe.fdw.control.layer.v1+text \ steampipe_postgres_fdw--1.0.sql:application/vnd.turbot.steampipe.fdw.sql.layer.v1+text + + # check if the version is NOT an rc version before tagging as latest + if [[ $VERSION =~ ^[0-9]+\.[0-9]+\.[0-9]+$ ]]; then + echo "Tagging as latest: $LATEST_REF" + oras tag $REF $LATEST_REF + else + echo "Skipping latest tag for rc version: $VERSION" + fi diff --git a/CHANGELOG.md b/CHANGELOG.md index 8adf40b2..339e54a5 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,3 +1,12 @@ +## v2.1.2 [2025-08-14] +_Bug fixes_ +- Fix darwin build: remove sysroot override for Darwin SDK path in Makefile. + +## v2.1.1 [2025-08-14] +_Bug fixes_ +- **v2+ Plugin Version Support**: Fixed import path generation in templates to correctly handle v2+ plugin versions. The build process now properly appends the major version to the module path (e.g., `github.com/turbot/steampipe-plugin-aws/v2` for v2.x.x plugins) instead of using the base path which was causing build failures. + + ## v2.1.0 [2025-07-09] _Whats new_ - Bump module to v2 and update Go version to 1.24. diff --git a/Makefile b/Makefile index b0d16fae..2019aa8f 100644 --- a/Makefile +++ b/Makefile @@ -28,8 +28,14 @@ standalone: validate_plugin validate_version prebuild.go cd work && \ go run generate/generator.go templates . $(plugin) $(plugin_version) $(plugin_github_url) && \ if [ ! -z "$(plugin_version)" ]; then \ - echo "go get $(plugin_github_url)@$(plugin_version)" && \ - go get $(plugin_github_url)@$(plugin_version); \ + MAJOR_VERSION=$$(echo $(plugin_version) | grep -o '^v[0-9]\+' || echo "v1") && \ + if [ "$$MAJOR_VERSION" = "v1" ] || [ "$$MAJOR_VERSION" = "v0" ]; then \ + echo "go get $(plugin_github_url)@$(plugin_version)" && \ + go get $(plugin_github_url)@$(plugin_version); \ + else \ + echo "go get $(plugin_github_url)/$$MAJOR_VERSION@$(plugin_version)" && \ + go get $(plugin_github_url)/$$MAJOR_VERSION@$(plugin_version); \ + fi; \ fi && \ go mod tidy && \ $(MAKE) -C ./fdw clean && \ @@ -61,8 +67,14 @@ render: validate_plugin validate_version prebuild.go cd work && \ go run generate/generator.go templates . $(plugin) $(plugin_version) $(plugin_github_url) && \ if [ ! -z "$(plugin_version)" ]; then \ - echo "go get $(plugin_github_url)@$(plugin_version)" && \ - go get $(plugin_github_url)@$(plugin_version); \ + MAJOR_VERSION=$$(echo $(plugin_version) | grep -o '^v[0-9]\+' || echo "v1") && \ + if [ "$$MAJOR_VERSION" = "v1" ] || [ "$$MAJOR_VERSION" = "v0" ]; then \ + echo "go get $(plugin_github_url)@$(plugin_version)" && \ + go get $(plugin_github_url)@$(plugin_version); \ + else \ + echo "go get $(plugin_github_url)/$$MAJOR_VERSION@$(plugin_version)" && \ + go get $(plugin_github_url)/$$MAJOR_VERSION@$(plugin_version); \ + fi; \ fi && \ go mod tidy diff --git a/fdw/Makefile b/fdw/Makefile index b1cdb66f..fb9508bc 100644 --- a/fdw/Makefile +++ b/fdw/Makefile @@ -9,9 +9,6 @@ PLATFORM=$(shell uname) ifeq ($(shell uname), Darwin) PG_LDFLAGS=-framework Foundation -framework AppKit -framework Security - # Override the sysroot to use the correct available SDK - override CPPFLAGS += -isysroot $(shell xcrun --show-sdk-path) - override LDFLAGS += -isysroot $(shell xcrun --show-sdk-path) endif EXTENSION = steampipe_postgres_fdw diff --git a/templates/hub/hub_local_plugin.go.tmpl b/templates/hub/hub_local_plugin.go.tmpl index ad30091a..1111b3d1 100644 --- a/templates/hub/hub_local_plugin.go.tmpl +++ b/templates/hub/hub_local_plugin.go.tmpl @@ -1,7 +1,7 @@ package hub import ( - {{.Plugin}} "{{.PluginGithubUrl}}/{{.Plugin}}" + {{.Plugin}} "{{.PluginGithubUrl}}{{if .PluginVersion}}{{if not (or (eq (slice .PluginVersion 0 2) "v1") (eq (slice .PluginVersion 0 2) "v0"))}}/{{slice .PluginVersion 0 2}}{{end}}{{end}}/{{.Plugin}}" "github.com/turbot/steampipe-plugin-sdk/v5/plugin" ) diff --git a/version/version.go b/version/version.go index 0db44669..cefb606f 100644 --- a/version/version.go +++ b/version/version.go @@ -11,7 +11,7 @@ import ( ) // The main version number that is being run at the moment. -var fdwVersion = "2.1.0" +var fdwVersion = "2.1.2" // A pre-release marker for the version. If this is "" (empty string) // then it means that it is a final release. Otherwise, this is a pre-release