We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent afd732d commit d683a7bCopy full SHA for d683a7b
revendor_opa.sh
@@ -0,0 +1,25 @@
1
+#!/usr/bin/env bash
2
+
3
+usage() {
4
+ echo "$0 <commit-ish> (e.g., $0 v0.9.1)"
5
+}
6
7
+if [ $# -eq 0 ]; then
8
+ usage
9
+ exit 1
10
+fi
11
12
+# Copied from https://unix.stackexchange.com/questions/92895/how-can-i-achieve-portability-with-sed-i-in-place-editing
13
+case $(sed --help 2>&1) in
14
+ *GNU*) sed_i () { sed -i "$@"; };;
15
+ *) sed_i () { sed -i '' "$@"; };;
16
+esac
17
18
+sed_i "/name = \"github.com\/open-policy-agent\/opa\"/{N;s/version = .*/version = \"$1\"/;}" Gopkg.toml
19
20
+git status | grep Gopkg.toml
21
22
+if [ $? -eq 0 ]; then
23
+ dep ensure
24
+ git add .
25
0 commit comments