Skip to content
This repository has been archived by the owner on Feb 1, 2024. It is now read-only.

Commit

Permalink
Properly version intkeym scar file
Browse files Browse the repository at this point in the history
Signed-off-by: Ryan Beck-Buysse <rbuysse@bitwise.io>
  • Loading branch information
rbuysse committed Feb 4, 2021
1 parent 00f78b5 commit 9831943
Show file tree
Hide file tree
Showing 4 changed files with 7 additions and 2 deletions.
1 change: 1 addition & 0 deletions .env
Expand Up @@ -14,3 +14,4 @@

ISOLATION_ID=latest
DISTRO=bionic
REPO_VERSION=0.7.2-dev
2 changes: 1 addition & 1 deletion Jenkinsfile
Expand Up @@ -92,7 +92,7 @@ pipeline {
steps {
sh 'docker-compose -f docker-compose-installed.yaml build sabre-cli'
sh 'docker-compose -f docker-compose-installed.yaml build sabre-tp'
sh 'docker-compose -f docker-compose-installed.yaml build intkey_multiply'
sh 'VERSION=AUTO_STRICT REPO_VERSION=$(bin/get_version) docker-compose -f docker-compose-installed.yaml build intkey_multiply'

}
}
Expand Down
2 changes: 2 additions & 0 deletions docker-compose-installed.yaml
Expand Up @@ -102,4 +102,6 @@ services:
build:
context: .
dockerfile: example/intkey_multiply/processor/Dockerfile-scar
args:
- REPO_VERSION=${REPO_VERSION}
image: intkeym-scar:${ISOLATION_ID}
4 changes: 3 additions & 1 deletion example/intkey_multiply/processor/Dockerfile-scar
Expand Up @@ -78,6 +78,8 @@ COPY example/intkey_multiply/processor/src \
/build/example/intkey_multiply/processor/src

# Build the contract
ARG REPO_VERSION
RUN sed -i -e s/version.*$/version\ =\ \"${REPO_VERSION}\"/ Cargo.toml
RUN cargo build --target wasm32-unknown-unknown --release

# Copy the packaging directory
Expand All @@ -91,4 +93,4 @@ RUN cp target/wasm32-unknown-unknown/release/intkey-multiply.wasm \
WORKDIR /build/example/intkey_multiply/processor/packaging/scar

# Create .scar file
RUN tar -jcvf /tmp/intkey-multiply_0.7.2.scar .
RUN tar -jcvf /tmp/intkey-multiply_${REPO_VERSION}.scar .

0 comments on commit 9831943

Please sign in to comment.