Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(106)

Unified Diff: third_party/protobuf/objectivec/DevTools/check_version_stamps.sh

Issue 1322483002: Revert https://codereview.chromium.org/1291903002 (protobuf roll). (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 5 years, 4 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
Index: third_party/protobuf/objectivec/DevTools/check_version_stamps.sh
diff --git a/third_party/protobuf/objectivec/DevTools/check_version_stamps.sh b/third_party/protobuf/objectivec/DevTools/check_version_stamps.sh
deleted file mode 100644
index 325b71dd9a296cbd7ac91e5c66cf51f478fdff19..0000000000000000000000000000000000000000
--- a/third_party/protobuf/objectivec/DevTools/check_version_stamps.sh
+++ /dev/null
@@ -1,56 +0,0 @@
-#!/bin/bash
-
-# This script checks that the runtime version number constant in the compiler
-# source and in the runtime source is the same.
-#
-# A distro can be made of the protobuf sources with only a subset of the
-# languages, so if the compiler depended on the Objective C runtime, those
-# builds would break. At the same time, we don't want the runtime source
-# depending on the compiler sources; so two copies of the constant are needed.
-
-set -eu
-
-readonly ScriptDir=$(dirname "$(echo $0 | sed -e "s,^\([^/]\),$(pwd)/\1,")")
-readonly ProtoRootDir="${ScriptDir}/../.."
-
-die() {
- echo "Error: $1"
- exit 1
-}
-
-readonly ConstantName=GOOGLE_PROTOBUF_OBJC_GEN_VERSION
-
-# Collect version from plugin sources.
-
-readonly PluginSrc="${ProtoRootDir}/src/google/protobuf/compiler/objectivec/objectivec_file.cc"
-readonly PluginVersion=$( \
- cat "${PluginSrc}" \
- | sed -n -e "s:const int32 ${ConstantName} = \([0-9]*\);:\1:p"
-)
-
-if [[ -z "${PluginVersion}" ]] ; then
- die "Failed to find ${ConstantName} in the plugin source (${PluginSrc})."
-fi
-
-# Collect version from runtime sources.
-
-readonly RuntimeSrc="${ProtoRootDir}/objectivec/GPBBootstrap.h"
-readonly RuntimeVersion=$( \
- cat "${RuntimeSrc}" \
- | sed -n -e "s:#define ${ConstantName} \([0-9]*\):\1:p"
-)
-
-if [[ -z "${RuntimeVersion}" ]] ; then
- die "Failed to find ${ConstantName} in the runtime source (${RuntimeSrc})."
-fi
-
-# Compare them.
-
-if [[ "${PluginVersion}" != "${RuntimeVersion}" ]] ; then
- die "Versions don't match!
- Plugin: ${PluginVersion} from ${PluginSrc}
- Runtime: ${RuntimeVersion} from ${RuntimeSrc}
-"
-fi
-
-# Success
« no previous file with comments | « third_party/protobuf/m4/stl_hash.m4 ('k') | third_party/protobuf/objectivec/DevTools/compile_testing_protos.sh » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698