Skip to content
This repository has been archived by the owner on Dec 8, 2021. It is now read-only.

Commit

Permalink
feat: moved quickstart/ -> google/cloud/spanner/ (#1479)
Browse files Browse the repository at this point in the history
* feat: moved quickstart/ -> google/cloud/spanner/

Fixes: googleapis/google-cloud-cpp#3973

* fixed quickstart path in build script
  • Loading branch information
devjgm committed Apr 30, 2020
1 parent b7946e1 commit 8976440
Show file tree
Hide file tree
Showing 23 changed files with 36 additions and 42 deletions.
2 changes: 1 addition & 1 deletion .bazelignore
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
ci/
cmake-out/
cmake-build-*/
quickstart/
google/cloud/spanner/quickstart/
10 changes: 5 additions & 5 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -55,12 +55,12 @@ Please note that the Google Cloud C++ client libraries do **not** follow

## Quickstart

The [quickstart/][quickstart-link] directory contains a minimal environment to
help you quickly get started using this client library. The following is the
"Hello World" program you'll be running, which should give you a taste of this
library.
The [google/cloud/spanner/quickstart/][quickstart-link] directory contains a
minimal environment to help you quickly get started using this client library.
The following is the "Hello World" program you'll be running, which should give
you a taste of this library.

[quickstart-link]: https://github.com/googleapis/google-cloud-cpp-spanner/tree/master/quickstart
[quickstart-link]: https://github.com/googleapis/google-cloud-cpp-spanner/tree/master/google/cloud/spanner/quickstart

```cc
#include "google/cloud/spanner/client.h"
Expand Down
2 changes: 1 addition & 1 deletion ci/etc/kokoro/install/project-config.sh
Original file line number Diff line number Diff line change
Expand Up @@ -79,7 +79,7 @@ ENV PKG_CONFIG_PATH=/usr/local/lib64/pkgconfig
# Verify that the installed files are actually usable
WORKDIR /home/build/test-install-cmake
COPY quickstart /home/build/test-install-cmake
COPY google/cloud/spanner/quickstart /home/build/test-install-cmake
# Disable pkg-config with CMake to verify it is not used in package discovery.
RUN env -u PKG_CONFIG_PATH cmake -H. -B/i
RUN cmake --build /i -- -j "${NCPU:-4}"
Expand Down
12 changes: 6 additions & 6 deletions ci/generate-markdown/generate-readme.sh
Original file line number Diff line number Diff line change
Expand Up @@ -79,19 +79,19 @@ Please note that the Google Cloud C++ client libraries do **not** follow
## Quickstart
The [quickstart/][quickstart-link] directory contains a minimal environment to
help you quickly get started using this client library. The following is the
"Hello World" program you'll be running, which should give you a taste of this
library.
The [google/cloud/spanner/quickstart/][quickstart-link] directory contains a
minimal environment to help you quickly get started using this client library.
The following is the "Hello World" program you'll be running, which should give
you a taste of this library.
[quickstart-link]: https://github.com/googleapis/google-cloud-cpp-spanner/tree/master/quickstart
[quickstart-link]: https://github.com/googleapis/google-cloud-cpp-spanner/tree/master/google/cloud/spanner/quickstart
```cc
_EOF_

# Dumps the contents of quickstart.cc starting at the first #include, so we
# skip the license header comment.
sed -n '/^#/,$p' "${BINDIR}/../../quickstart/quickstart.cc"
sed -n '/^#/,$p' "${BINDIR}/../../google/cloud/spanner/quickstart/quickstart.cc"

cat <<'_EOF_'
````
Expand Down
13 changes: 4 additions & 9 deletions ci/generate-markdown/generate-spanner-readme.sh
Original file line number Diff line number Diff line change
Expand Up @@ -53,22 +53,17 @@ Please note that the Google Cloud C++ client libraries do **not** follow
## Quickstart
<!-- TODO(googleapis/google-cloud-cpp#3973): move the quickstart directory -->
The [quickstart/](../../../quickstart/) directory contains a minimal environment to
help you quickly get started using this client library. The following is the
"Hello World" program you'll be running, which should give you a taste of this
The [quickstart/](quickstart/) directory contains a minimal environment to help
you quickly get started using this client library. The following is the "Hello
World" program you'll be running, which should give you a taste of this
library.
```cc
_EOF_

# TODO(googleapis/google-cloud-cpp#3973): move the quickstart directory to
# google/cloud/spanner.
#
# Dumps the contents of quickstart.cc starting at the first #include, so we
# skip the license header comment.
sed -n '/^#/,$p' "${BINDIR}/../../quickstart/quickstart.cc"
sed -n '/^#/,$p' "${BINDIR}/../../google/cloud/spanner/quickstart/quickstart.cc"

cat <<'_EOF_'
````
Expand Down
2 changes: 1 addition & 1 deletion ci/kokoro/docker/build-in-docker-bazel-dependency.sh
Original file line number Diff line number Diff line change
Expand Up @@ -52,7 +52,7 @@ if [[ -n "${BAZEL_CONFIG}" ]]; then
bazel_args+=(--config "${BAZEL_CONFIG}")
fi

cd quickstart
cd google/cloud/spanner/quickstart

echo "================================================================"
echo "Fetching dependencies $(date)"
Expand Down
2 changes: 1 addition & 1 deletion ci/kokoro/install/Dockerfile.centos-7
Original file line number Diff line number Diff line change
Expand Up @@ -152,7 +152,7 @@ ENV PKG_CONFIG_PATH=/usr/local/lib64/pkgconfig

# Verify that the installed files are actually usable
WORKDIR /home/build/test-install-cmake
COPY quickstart /home/build/test-install-cmake
COPY google/cloud/spanner/quickstart /home/build/test-install-cmake
# Disable pkg-config with CMake to verify it is not used in package discovery.
RUN env -u PKG_CONFIG_PATH cmake -H. -B/i
RUN cmake --build /i -- -j "${NCPU:-4}"
2 changes: 1 addition & 1 deletion ci/kokoro/install/Dockerfile.centos-8
Original file line number Diff line number Diff line change
Expand Up @@ -131,7 +131,7 @@ ENV PKG_CONFIG_PATH=/usr/local/lib64/pkgconfig

# Verify that the installed files are actually usable
WORKDIR /home/build/test-install-cmake
COPY quickstart /home/build/test-install-cmake
COPY google/cloud/spanner/quickstart /home/build/test-install-cmake
# Disable pkg-config with CMake to verify it is not used in package discovery.
RUN env -u PKG_CONFIG_PATH cmake -H. -B/i
RUN cmake --build /i -- -j "${NCPU:-4}"
2 changes: 1 addition & 1 deletion ci/kokoro/install/Dockerfile.debian-buster
Original file line number Diff line number Diff line change
Expand Up @@ -94,7 +94,7 @@ ENV PKG_CONFIG_PATH=/usr/local/lib64/pkgconfig

# Verify that the installed files are actually usable
WORKDIR /home/build/test-install-cmake
COPY quickstart /home/build/test-install-cmake
COPY google/cloud/spanner/quickstart /home/build/test-install-cmake
# Disable pkg-config with CMake to verify it is not used in package discovery.
RUN env -u PKG_CONFIG_PATH cmake -H. -B/i
RUN cmake --build /i -- -j "${NCPU:-4}"
2 changes: 1 addition & 1 deletion ci/kokoro/install/Dockerfile.debian-stretch
Original file line number Diff line number Diff line change
Expand Up @@ -127,7 +127,7 @@ ENV PKG_CONFIG_PATH=/usr/local/lib64/pkgconfig

# Verify that the installed files are actually usable
WORKDIR /home/build/test-install-cmake
COPY quickstart /home/build/test-install-cmake
COPY google/cloud/spanner/quickstart /home/build/test-install-cmake
# Disable pkg-config with CMake to verify it is not used in package discovery.
RUN env -u PKG_CONFIG_PATH cmake -H. -B/i
RUN cmake --build /i -- -j "${NCPU:-4}"
2 changes: 1 addition & 1 deletion ci/kokoro/install/Dockerfile.fedora
Original file line number Diff line number Diff line change
Expand Up @@ -100,7 +100,7 @@ ENV PKG_CONFIG_PATH=/usr/local/lib64/pkgconfig

# Verify that the installed files are actually usable
WORKDIR /home/build/test-install-cmake
COPY quickstart /home/build/test-install-cmake
COPY google/cloud/spanner/quickstart /home/build/test-install-cmake
# Disable pkg-config with CMake to verify it is not used in package discovery.
RUN env -u PKG_CONFIG_PATH cmake -H. -B/i
RUN cmake --build /i -- -j "${NCPU:-4}"
2 changes: 1 addition & 1 deletion ci/kokoro/install/Dockerfile.opensuse-leap
Original file line number Diff line number Diff line change
Expand Up @@ -147,7 +147,7 @@ ENV PKG_CONFIG_PATH=/usr/local/lib64/pkgconfig

# Verify that the installed files are actually usable
WORKDIR /home/build/test-install-cmake
COPY quickstart /home/build/test-install-cmake
COPY google/cloud/spanner/quickstart /home/build/test-install-cmake
# Disable pkg-config with CMake to verify it is not used in package discovery.
RUN env -u PKG_CONFIG_PATH cmake -H. -B/i
RUN cmake --build /i -- -j "${NCPU:-4}"
2 changes: 1 addition & 1 deletion ci/kokoro/install/Dockerfile.opensuse-tumbleweed
Original file line number Diff line number Diff line change
Expand Up @@ -98,7 +98,7 @@ ENV PKG_CONFIG_PATH=/usr/local/lib64/pkgconfig

# Verify that the installed files are actually usable
WORKDIR /home/build/test-install-cmake
COPY quickstart /home/build/test-install-cmake
COPY google/cloud/spanner/quickstart /home/build/test-install-cmake
# Disable pkg-config with CMake to verify it is not used in package discovery.
RUN env -u PKG_CONFIG_PATH cmake -H. -B/i
RUN cmake --build /i -- -j "${NCPU:-4}"
2 changes: 1 addition & 1 deletion ci/kokoro/install/Dockerfile.ubuntu-bionic
Original file line number Diff line number Diff line change
Expand Up @@ -120,7 +120,7 @@ ENV PKG_CONFIG_PATH=/usr/local/lib64/pkgconfig

# Verify that the installed files are actually usable
WORKDIR /home/build/test-install-cmake
COPY quickstart /home/build/test-install-cmake
COPY google/cloud/spanner/quickstart /home/build/test-install-cmake
# Disable pkg-config with CMake to verify it is not used in package discovery.
RUN env -u PKG_CONFIG_PATH cmake -H. -B/i
RUN cmake --build /i -- -j "${NCPU:-4}"
2 changes: 1 addition & 1 deletion ci/kokoro/install/Dockerfile.ubuntu-xenial
Original file line number Diff line number Diff line change
Expand Up @@ -135,7 +135,7 @@ ENV PKG_CONFIG_PATH=/usr/local/lib64/pkgconfig

# Verify that the installed files are actually usable
WORKDIR /home/build/test-install-cmake
COPY quickstart /home/build/test-install-cmake
COPY google/cloud/spanner/quickstart /home/build/test-install-cmake
# Disable pkg-config with CMake to verify it is not used in package discovery.
RUN env -u PKG_CONFIG_PATH cmake -H. -B/i
RUN cmake --build /i -- -j "${NCPU:-4}"
2 changes: 1 addition & 1 deletion google/cloud/spanner/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@ set(DOXYGEN_PROJECT_NAME "Google Cloud Spanner C++ Client")
set(DOXYGEN_PROJECT_BRIEF "A C++ Client Library for Google Cloud Spanner")
set(DOXYGEN_PROJECT_NUMBER "${GOOGLE_CLOUD_CPP_CLIENT_VERSION}")
set(DOXYGEN_EXAMPLE_PATH ${CMAKE_CURRENT_SOURCE_DIR}/samples
${CMAKE_CURRENT_SOURCE_DIR}/../../../quickstart)
${CMAKE_CURRENT_SOURCE_DIR}/quickstart)
set(DOXYGEN_EXCLUDE_SYMBOLS "internal" "spanner_testing")
set(DOXYGEN_PREDEFINED "SPANNER_CLIENT_NS=v${GOOGLE_CLOUD_CPP_VERSION_MAJOR}")
set(DOXYGEN_EXCLUDE_PATTERNS
Expand Down
8 changes: 3 additions & 5 deletions google/cloud/spanner/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -29,11 +29,9 @@ Please note that the Google Cloud C++ client libraries do **not** follow

## Quickstart

<!-- TODO(googleapis/google-cloud-cpp#3973): move the quickstart directory -->

The [quickstart/](../../../quickstart/) directory contains a minimal environment to
help you quickly get started using this client library. The following is the
"Hello World" program you'll be running, which should give you a taste of this
The [quickstart/](quickstart/) directory contains a minimal environment to help
you quickly get started using this client library. The following is the "Hello
World" program you'll be running, which should give you a taste of this
library.

```cc
Expand Down
9 changes: 5 additions & 4 deletions google/cloud/spanner/doc/spanner-main.dox
Original file line number Diff line number Diff line change
Expand Up @@ -36,13 +36,14 @@ application. You can fetch the source from [GitHub][github-link] as normal:

@code{.sh}
git clone https://github.com/googleapis/google-cloud-cpp-spanner.git
cd google-cloud-cpp-spanner/quickstart
cd google-cloud-cpp-spanner/google/cloud/spanner/quickstart
@endcode

@par Example: Hello World

The following shows the code that you'll run in the `quickstart/` directory,
which should give you a taste of the Cloud Spanner C++ client library API.
The following shows the code that you'll run in the
`google/cloud/spanner/quickstart/` directory, which should give you a taste of
the Cloud Spanner C++ client library API.

@include quickstart.cc

Expand Down Expand Up @@ -157,7 +158,7 @@ period between retries.
[authentication-quickstart]: https://cloud.google.com/docs/authentication/getting-started 'Authentication Getting Started'
[gcloud-quickstart]: https://cloud.google.com/sdk/docs/quickstarts
[github-link]: https://github.com/googleapis/google-cloud-cpp-spanner 'GitHub Repository'
[quickstart-link]: https://github.com/googleapis/google-cloud-cpp-spanner/blob/master/quickstart
[quickstart-link]: https://github.com/googleapis/google-cloud-cpp-spanner/blob/master/google/cloud/spanner/quickstart
[status-or-header]: https://github.com/googleapis/google-cloud-cpp-common/blob/master/google/cloud/status_or.h

*/
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.

0 comments on commit 8976440

Please sign in to comment.