Commit 2d0b35fa authored by Fraser Waters's avatar Fraser Waters Committed by Leo
Browse files

testing/pulumi: Update get-version patch

Change the get-version script rather than the top level makefile, as
other makefiles also call get-version to get the version string.
parent 9c685d24
Pipeline #68124 failed with stages
in 24 seconds
......@@ -3,22 +3,26 @@ Currently the build system assumes your in a git repo to get the version, and
doesn't quite provide a way to build just the native components we need to
apk package.
index 7f2aa25f9..b1cb72f43 100755
--- a/scripts/get-version
+++ b/scripts/get-version
@@ -6,6 +6,12 @@ if [ $# -eq 0 ]; then
exit 1
fi
+# Allow version to be set manually when building outside of git repo
+if [ -n "${PULUMI_VERSION+x}" ]; then
+ echo "${PULUMI_VERSION}"
+ exit 0
+fi
+
COMMITISH=$1
DIRTY_TAG=""
EXACT=0
diff --git a/Makefile b/Makefile
index 0b81a9de2..26a2f8e8a 100644
--- a/Makefile
+++ b/Makefile
@@ -5,7 +5,10 @@ include build/common.mk
PROJECT := github.com/pulumi/pulumi/pkg/v2/cmd/pulumi
PROJECT_PKGS := $(shell cd ./pkg && go list ./... | grep -v /vendor/)
TESTS_PKGS := $(shell cd ./tests && go list ./... | grep -v tests/templates | grep -v /vendor/)
-VERSION := $(shell scripts/get-version HEAD)
+# Allow version to be set manually when building outside of git repo
+ifeq ($(VERSION),)
+ VERSION := $(shell scripts/get-version HEAD)
+endif
TESTPARALLELISM := 10
@@ -53,6 +56,8 @@ install:: generate
install_all:: install
......
......@@ -2,7 +2,7 @@
# Maintainer: Fraser Waters <frassle@gmail.com>
pkgname=pulumi
pkgver=2.16.2
pkgrel=0
pkgrel=1
pkgdesc="Pulumi's Infrastructure as Code SDK"
url="https://github.com/pulumi/pulumi"
# x86_64 is the only supported architecture by pulumi
......@@ -24,7 +24,7 @@ prepare() {
build() {
export GOFLAGS="$GOFLAGS -modcacherw"
VERSION="v$pkgver" PULUMI_ROOT="$srcdir"/opt GOPATH="$srcdir" make install_plugin_all
PULUMI_VERSION="v$pkgver" PULUMI_ROOT="$srcdir"/opt GOPATH="$srcdir" make install_plugin_all
}
check() {
......@@ -38,4 +38,4 @@ package() {
}
sha512sums="dee178215b55e869017a9330a80e0e93ebf9a9ce9eb8d34c192d6812bfde50e607261c7442c4d4f1fb6feffb77831b14144f140fe9d3e66d5240fe8ca1364bbd pulumi-2.16.2.tar.gz
56bfc1908b8728f241cae804fdb010910db763ddfbb39417e7173654d522d3dadcc063176172e894f23fc6306f31e521c65a83ca567d384f2cdeefffd071db40 10-install1.patch"
e096ba0c25f53590bcb778dae21ed9505bfff498a78aa0aff79286f0991510d31dab2fc7e6e479d1a351444d17fe2a0df320ffe14823446bec6ea4d1f2f17e16 10-install1.patch"
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment