Skip to content

Commit

Permalink
refactor
Browse files Browse the repository at this point in the history
  • Loading branch information
dominik-przybyl-wttech committed Feb 29, 2024
1 parent 3f4f6c8 commit dd4428d
Show file tree
Hide file tree
Showing 7 changed files with 13 additions and 12 deletions.
13 changes: 7 additions & 6 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ PACK := aem
MOD := compose
PACKDIR := sdk
PROJECT := github.com/wttech/pulumi-aem
NODE_MODULE_NAME := @pulumi/aem
NODE_MODULE_NAME := @wttech/aem
NUGET_PKG_NAME := Pulumi.Aem

PROVIDER := pulumi-resource-${PACK}
Expand Down Expand Up @@ -43,17 +43,18 @@ dotnet_sdk::
go_sdk:: $(WORKING_DIR)/bin/$(PROVIDER)
rm -rf sdk/go
pulumi package gen-sdk $(WORKING_DIR)/bin/$(PROVIDER) --language go
sed -e 's/"internal"/"github.com\/wttech\/pulumi-aem\/sdk\/go\/aem\/internal"/g' sdk/go/$(PACK)/init.go > sdk/go/$(PACK)/init.go.tmp && mv sdk/go/$(PACK)/init.go.tmp sdk/go/$(PACK)/init.go
sed -e 's/"internal"/"github.com\/wttech\/pulumi-aem\/sdk\/go\/aem\/internal"/g' sdk/go/$(PACK)/provider.go > sdk/go/$(PACK)/provider.go.tmp && mv sdk/go/$(PACK)/provider.go.tmp sdk/go/$(PACK)/provider.go
sed -e 's/"internal"/"github.com\/wttech\/pulumi-aem\/sdk\/go\/aem\/internal"/g' sdk/go/$(PACK)/$(MOD)/init.go > sdk/go/$(PACK)/$(MOD)/init.go.tmp && mv sdk/go/$(PACK)/$(MOD)/init.go.tmp sdk/go/$(PACK)/$(MOD)/init.go
sed -e 's/"internal"/"github.com\/wttech\/pulumi-aem\/sdk\/go\/aem\/internal"/g' sdk/go/$(PACK)/$(MOD)/instanceResourceModel.go > sdk/go/$(PACK)/$(MOD)/instanceResourceModel.go.tmp && mv sdk/go/$(PACK)/$(MOD)/instanceResourceModel.go.tmp sdk/go/$(PACK)/$(MOD)/instanceResourceModel.go
sed -e 's/"internal"/"github.com\/wttech\/pulumi-aem\/sdk\/go\/aem\/internal"/g' sdk/go/$(PACK)/$(MOD)/pulumiTypes.go > sdk/go/$(PACK)/$(MOD)/pulumiTypes.go.tmp && mv sdk/go/$(PACK)/$(MOD)/pulumiTypes.go.tmp sdk/go/$(PACK)/$(MOD)/pulumiTypes.go
sed -i.bak 's/"internal"/"github.com\/wttech\/pulumi-aem\/sdk\/go\/aem\/internal"/g' sdk/go/$(PACK)/*.go
sed -i.bak 's/"internal"/"github.com\/wttech\/pulumi-aem\/sdk\/go\/aem\/internal"/g' sdk/go/$(PACK)/$(MOD)/*.go
rm ./sdk/go/$(PACK)/*.go.bak
rm ./sdk/go/$(PACK)/$(MOD)/*.go.bak

nodejs_sdk:: VERSION := $(shell pulumictl get version --language javascript)
nodejs_sdk::
rm -rf sdk/nodejs
pulumi package gen-sdk $(WORKING_DIR)/bin/$(PROVIDER) --language nodejs
cd ${PACKDIR}/nodejs/ && \
sed -i.bak 's/@pulumi\/aem/@wttech\/aem/g' package.json && \
rm ./package.json.bak && \
yarn install && \
yarn run tsc && \
cp ../../README.md ../../LICENSE package.json yarn.lock bin/ && \
Expand Down
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -91,7 +91,7 @@ This will:

```bash
$ cd examples/simple
$ yarn link @pulumi/aem
$ yarn link @wttech/aem
$ yarn install
$ pulumi stack init test
$ pulumi up
Expand Down
2 changes: 1 addition & 1 deletion examples/go_aws_ssh/go.mod
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
module github.com/wttech/pulumi-aem/examples
module github.com/wttech/pulumi-aem/examples/go_aws_ssh

go 1.21

Expand Down
2 changes: 1 addition & 1 deletion examples/go_aws_ssm/go.mod
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
module github.com/wttech/pulumi-aem/examples/ssm
module github.com/wttech/pulumi-aem/examples/go_aws_ssm

go 1.21

Expand Down
2 changes: 1 addition & 1 deletion examples/ts_aws_ssm/index.ts
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import * as aem from "@pulumi/aem";
import * as aem from "@wttech/aem";
import * as aws from "@pulumi/aws";

const workspace = "aemc"
Expand Down
2 changes: 1 addition & 1 deletion examples/ts_aws_ssm/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,6 @@
"dependencies": {
"typescript": "^4.0.0",
"@pulumi/aws": "^3.0.0",
"@pulumi/aem": "0.0.1-alpha.1699945013+97b0e04c"
"@wttech/aem": "0.0.1-alpha.1699945013+97b0e04c"
}
}
2 changes: 1 addition & 1 deletion sdk/nodejs/package.json
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
{
"name": "@pulumi/aem",
"name": "@wttech/aem",
"version": "${VERSION}",
"scripts": {
"build": "tsc"
Expand Down

0 comments on commit dd4428d

Please sign in to comment.