up release, add lang go

This commit is contained in:
Sergey Zhemoitel 2021-08-26 02:05:07 +03:00
parent 62c86d6de5
commit af73c8bb26

View file

@ -4,7 +4,7 @@
Name: pulumi Name: pulumi
Version: 3.11.0 Version: 3.11.0
Release: 1 Release: 2
Summary: Modern Infrastructure as Code Summary: Modern Infrastructure as Code
URL: https://www.pulumi.com URL: https://www.pulumi.com
Source0: https://github.com/pulumi/pulumi/archive/v%{version}/%{name}-%{version}.tar.gz Source0: https://github.com/pulumi/pulumi/archive/v%{version}/%{name}-%{version}.tar.gz
@ -22,23 +22,46 @@ on any cloud.
%prep %prep
%setup -q %setup -q
#-------------------------------------------------------------------------------
%package -n %{name}-language-go
Summary: Pulumi laguage go
Requires: %{name} = %{EVRD}
%description -n %{name}-language-go
Pulumi language go
%files -n %{name}-language-go
%doc README.md LICENSE
%{_bindir}/%{name}-language-go
#-------------------------------------------------------------------------------
%build %build
export GO111MODULE=on
pushd pkg pushd pkg
go mod download go mod download
go generate ./codegen/docs/gen.go go generate ./codegen/docs/gen.go
GO111MODULE=on go build "-buildmode=pie" -ldflags "-X github.com/pulumi/pulumi/pkg/v3/version.Version=%{version}" -o ../bin/%{name} ./cmd/pulumi go build "-buildmode=pie" -ldflags "-X github.com/pulumi/pulumi/pkg/v3/version.Version=%{version}" -o ../bin/%{name} ./cmd/pulumi
popd
# build pulumi-language-go
pushd sdk
go mod download
go generate ./pulumi/...
go build -ldflags "-X github.com/pulumi/pulumi/sdk/v3/go/common/version.Version=%{version}" -o ../bin/%{name}-language-go ../sdk/go/%{name}-language-go
popd popd
%install %install
install -Dm0755 bin/%{name} %{buildroot}%{_bindir}/%{name} install -Dm0755 bin/%{name} %{buildroot}%{_bindir}/%{name}
install -Dm0755 bin/pulumi-language-go %{buildroot}%{_bindir}/%{name}-language-go
# install bash completion # install bash completion
install -d %{buildroot}%{_sysconfdir}/bash_completion.d/ install -d %{buildroot}%{_sysconfdir}/bash_completion.d/
./bin/%{name} gen-completion bash > %{buildroot}%{_sysconfdir}/bash_completion.d/%{name} ./bin/%{name} gen-completion bash > %{buildroot}%{_sysconfdir}/bash_completion.d/%{name}
%files %files
%doc README.md LICENSE %doc sdk/go/README.md LICENSE
%{_bindir}/%{name} %{_bindir}/%{name}
%{_sysconfdir}/bash_completion.d/%{name} %{_sysconfdir}/bash_completion.d/%{name}